This is running on Windows Server 2008 and used to work several months ago. I am just now using this server again for some dev work with VS.
This is live web server used to serve up a few test sites as well.
This came up when running Visual Studio, then launching my projects for debugging.
Trying to launch any site through localhost:xxxx
when IISExpress has been launched (using actual port #'s in the config to access different sites):
This webpage is not available ERR_CONNECTION_REFUSED
I have been at this for a few days already, as I have read others have had similar issues, tried most things I have read including changing the managedruntimeversion
from "v4.0" to "v4.0.30319" for .net 4.5 (I have never had to do this before) and disabling the logging module (all suggestions found here).
There are only two entries in my hosts
file that point to internal server IP addresses. No localhost
related IP's or references.
I have gone as far as re-installing IIS Express, and Visual Studio 2013. I also created a brand new WebApplication
site to try to resolve this (simple and no other complicated bindings).
When I spin up Fiddler, I see the following on the page:
[Fiddler] The socket connection to localhost failed. ErrorCode: 10061. No connection could be made because the target machine actively refused it 127.0.0.1:23162
I have removed all proxy settings from IE's LAN connection section, where before I was getting a red-x popup in VS indicating something like IISExpress could not launch.
This is not a matter of SSL vs non SSL.
I had TFS Server installed - uninstalled that in case there were some odd bindings that were interfering.
I tried deleting the IISExpress config/settings folder several times.
Current applicationhost.config contains:
<site name="WebApplication1" id="4"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\TFS-WorkRepository\Sandbox\WebApplication1\WebApplication1" /> </application> <bindings> <binding protocol="http" bindingInformation="*:23162:localhost" /> </bindings> </site> <siteDefaults> <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" /> <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" /> </siteDefaults> <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
I wish there was a tag for really-stuck
.
Please suggest away, as I don't want to go as far as spinning up a new server.
-- UPDATE --
In the URL bar, when I enter the computer name or IP address :xxxx I get the ERR_CONNECTION_TIMED_OUT
rather than ERR_CONNECTION_REFUSED
.
Found a workaround solution : uninstall IIS Express and reinstall it. Now I can open visual studio, create a WebApplication MVC type, run it locally and my localhost with its port number can open properly.
0.1 (loopback address). So your client is trying to connect to any of the non-loopback addresses of your machine, while your server is listening only on the loopback address . So, no connection can be established. The solution to this problem is that connect to the same end point your server is listening on.
Try changing the port number in your project?
Project Properties → Web → Servers → Project Url:
Don't forget to click Create Virtual Directory
, or reply "Yes" to the prompt for creating virtual directory after you change your port number! (Thanks Connor)
Note: I'm a little reluctant to post this as an answer, as I have no idea what the issue is or what caused it, but I had a similar issue, and changing the port number did the trick for me. I'm only posting this per the suggestion in the comments that this worked for someone else as well.
In my case, it seemed like something was conflicting with the specific port number I was using, so I changed to a different one, and my site popped right back up! I'm not sure what that means for the old port number, or if I'll ever be able to use it again. Maybe someone more knowledgeable than myself can chime in on this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With