Reputation: 1474
Suddenly this morning I turned on my computer and launched visual studio... And no matter what I tried and whether I run or debug, and whatever the browser is ( chrome / firefox / IE 11 ) it is waiting for localhost forever.
If I deploy it to azure, by just checking in ( continuous integration ) it works like a charm
I've read both:
As I write, it has been waiting for localhost for more than 15mins. I restarted VS, even rebooted the computer... tried the ipv6 disable stuff on firefox...etc
I noted ( do not know if it is useful ) that Replacing localhost by 127.0.0.1 throws:
Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.
also my C:\Windows\System32\drivers\etc\hosts ( unchanged )
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Any idea ? I've not been able to show a single localhost page in 3hours.
Upvotes: 26
Views: 57030
Reputation: 3480
In our case, the issue was Symantec Endpoint Protection. By turning off the Enable Network Intrusion Prevention
option on the Network and Host Exploit Mitigation
module, Localhost was working again.
Upvotes: 0
Reputation: 319
In my case there was a problem with configuration of Visual Studio stored in /.vs folder inside solution directory.
During development a lot of changes were made in IIS configuration: creating new sites, replacing old ones, changing pools etc. So Visual Studio have lost "connection" to given site and its pool. After deleting of /.vs folder and launching of Visual Studio the new execution configuration was created and it was properly attached to current IIS configuration.
Upvotes: 1
Reputation: 406
Please check WEB.CONFIG file, I had a similar issue where my site got "Waiting for" forever. Tried restarting the website, laptop nothing happened, it was prompting me for SQLServerExpress, I realized that the database server was not correct on my web.config so I changed it to the correct one which resolved my issue
Upvotes: 0
Reputation: 101
I was Able to Connect to Application when asp.net waiting for <...> modal appear then i Click Browse in my IIS
note : You must create the Application Pool and Website manually and set the website pool to Application pool that you have been created before.
Upvotes: 0
Reputation: 42417
In my case, the problem was that IIS didn't have sufficient permissions to the website.
I fixed it by granting Full Access permission to the IIS_IUSRS user on my entire website code folder (as in yoursolutionfolder\yourwebsiteprojectfolder
).
Then after granting permissions, I had to run iisreset
for it to start working.
Upvotes: 1
Reputation: 465
Sometime it happens due to issue with symbols loading. Try this
Go to Tools -> Options -> Debugging -> Symbols
and click the button 'Empty Symbols Cache'
Upvotes: 2
Reputation: 1236
For me, on aspnet core it was a problem in Configure() method hanging because of exception
Upvotes: 0
Reputation: 1
My issue was a result of a not having proper credentials on the working website folder. If you arent sure grant full control to the folder as a test. User = IIS AppPool[app pool name]
Upvotes: 0
Reputation: 5291
I had received a project where the webconfig had port number mentioned along with the server like this.
sqlConnectionString="Data Source=<<SQLInstanceName>>\SQLEXPRESS,<<Port>>;Initial Catalog=<<DBName>>;Integrated Security=false;User Id=<<UserName>>;PWD=<<Password>>;"
After removing the port number from connection string, the error message disappeared and code began to work.
sqlConnectionString="Data Source=<<SQLInstanceName>>\SQLEXPRESS;Initial Catalog=<<DBName>>;Integrated Security=false;User Id=<<UserName>>;PWD=<<Password>>;"
I am relative new to ASP.net. Dont know if this is going to cause problem elsewhere (^_^).
Upvotes: 0
Reputation: 10679
I had a similar issue where my site got "Waiting for" forever. Tried restarting the website and nothing.
I was not able to reboot the machine (I am pretty sure that it would solve) so I kept investigating what could be.
I found out that, in my case, the solution was to change the "Application Pool" of the website. It appears that the current one crashed or something like that (I was able to stop it but not start it back again), so I created a new Application Pool and the site started working again.
Upvotes: 5
Reputation: 45253
Okay, I've found that this happens (on a server) when you've hardened security properly.
For example, you no longer blanket apply IIS_IUSRS
to the wwwroot
but setup proper accounts for each App Pool and are setting the NTFS perms properly.
The problem is that the worker process/ASP.NET wants to enumerate the files in the folders "leading up to" your website root. I think it wants to look for web.config files etc.
The failure to produce an error, i.e. the infinite loading is a bug in my opinion.
e.g. i:\wwwroot\project\virtual\base
You'll need to apply IIS_IUSRS
group read access to wwwroot, project, virtual but not base. The trick is to only apply to the current folder, i.e. don't apply to subfolders and files.
Apply read rights just to the worker process/AppPool identity to the base folder.
If IIS_IUSRS
has read rights to the whole tree, then all worker processes will have read access to all other website base folders and contents, such that a compromised site will be able to access data/config in other sites.
Upvotes: 4
Reputation: 33
Restarting the IIS may work as it will end the current instance and run your web page in a new instance.
Upvotes: 0
Reputation: 571
Check firewall for blocked ports, change dynamic ports of application to some fixed port.
Upvotes: 17