Reputation: 947
I have been struggling with debugging on Visual studio 2015 Community Update 1 and 2. After first debug session everything works correctly. But when I make changes during the debug and I refresh the website, it start waiting on localhost forever. This also happens if I stop debugging, make changes and then launch debug session again. This happens 95% of the time. I have searched stackoverflow and googled for similiar problems and none of the answer others has proposed has not fixed this problem. Only what works is to restart VS again after first debug.
What I have tried so far:
I'm running out of patience and ideas how to fix this annoying problem. My guess is something goes wrong after first load of files and then when VS try to copy files back to temporary folder, it can't or something stops working. Anyone got ideas?
Upvotes: 8
Views: 5177
Reputation: 1969
In my case it was caused by the SignalR performance counters (if you use SignalR). If you install them manually, the waiting for local host disappears.
A detailed description on how to install the SignalR performance counters can be found on the Microsoft site: http://www.asp.net/signalr/overview/performance/signalr-performance#perfcounters
Upvotes: 1
Reputation: 3162
Sometimes it helps to:
taskkill /f /im:iisexpress.exe
rmdir /s /q [path to your solution]\bin
rmdir /s /q [path to your solution]\obj
taskkill /f /im:conhost.exe
I've that in a wee batch file that I run before trying to deploy / debug, particularly when I'm switching between Debug and Release modes. Basically, clearing out the objects and killing off the iis express and console host give you a fresh start.
Upvotes: 2
Reputation: 7960
Here are new things for you to try, I believe one of them will solve ur issue. I am listing from most I believed to least:
Try to create new app pool and assign your website to it. Make sure the user authentication for the new app pool is provided correctly.
Set the connection timeout to something reasonable like 15 seconds in the web.config.
Try using local IP address instead localhost Disable all the antivirus programs in addition to firewalls, if you are using. Check for the blocked ports on firewall and change the dynamic ports of application if any to fixed trustable ports.
Someone says on the internet:"the problem might be that downloading files from torrent and your database is on a different server"
Someone on internet also says: "I deleted the .suo file and this fixed the issue."
This website might help also: http://dustyreagan.com/localhost-doesnt-work-cant-debug-your/
EDIT: Please check the solutions on this websites: https://marcclifton.wordpress.com/2014/05/18/page-not-rendering-with-iis-express-in-firefox-or-chrome-waiting-for-localhost/
http://codetunnel.io/how-to-debug-your-aspnet-projects-running-under-iis/
Upvotes: 3