Click here to Skip to main content
15,879,004 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I using HttpWebRequest Class in My project, I am making calls to both https and http pages.

Https Requests are working fine.

Http requests are throwing the below error to the same site.

Exception Message: Unable to connect to the remote server

Inner message: An attempt was made to access a socket in a way forbidden by its access permissions 68.142.215.20:80

I have googled for solution, didn't get correct solution.

Thanks,
nagaraj
Posted

1 solution

The error is self describing. The Uri you are accessing not giving access at port 80 which is restricted for security reasons. Try to access it in browser and if not works contact the site owner for more information. If it is your site then check the permissions.
 
Share this answer
 
Comments
Nagaraj Muthuchamy 25-Apr-11 18:00pm    
This is happening with all the sites.

I can view those sites in browser.

It's failing only when I make http request.

Thanks,
Nagaraj

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900