R – Local ASP.Net connection issues


I have been trying to set-up my recently reimaged workstation for working with one of our ASP.Net applications that consists of a ASP.Net website and some C# Web Services. I can successfully start debug instances of each the services and web site. However as soon as the site attempts to connect to and use one of the web services I get the following exception.

No connection could be made because
the target machine actively refused it

Description: An unhandled exception occurred during
the execution of the current web
request. Please review the stack trace
for more information about the error
and where it originated in the code.

Exception Details:
System.Net.Sockets.SocketException: No
connection could be made because the
target machine actively refused it

So it looks like my PC is refusing the connection to itself. My first thought was to to check the windows firewall is disabled and it is disabled (the service is not running). I do not think IT has any other firewall software running on this PC, so I am a bit stumped as to what else could be causing the connection to be refused.

Best Solution

Silly question, but do you actually have IIS installed on your machine? When you run debug instances of your applications, it's running outside of IIS. If you're running debug instances of both your site and your service, your service probably isn't running on port 80.

Double check your IIS installation...and then set up your service running on port 80 properly.

Related Question