An attempt was made to access a socket in a way forbidden by its access permissions

If you're getting the same error in Windows 8 development, it could be that you haven't enabled access over Private Networks in your Package.appxmanifest file:

Highlighting the Private Networks (Client & Server) option


Solved... my bad - my firewall was "silently" blocking ISS worker process from connecting on port 443... I hope that at least I save somebody from the same mistake :)


I know this post is from 2011, but it's still the first result for the google search matching its title verbatim, which happens to be the exact error code ;). Anywho, I thought I'd add my two cents for anybody else having the error, as my resolution was similar yet different.

The problem was on my end as well. I was using an smtp client to send mail, though. I run PeerBlock, and it blocks suspicious IPs. I saw it was blocking one of the IPs I was sending to before it left my network. A simple rule exception and the problem was solved.

TL;DR Firewalls and other internet security filtering tools should all be checked to make sure this problem isn't caused on your end.