Waiting for localhost, forever!
I have a gridview on my开发者_JAVA百科 homepage with a view and an edit link that use query strings to display table data in read-only and editable pages, respectively. I get no error messages from my code, it's simple enough that it doesn't seem to be missing anything, but when I try to debug or view in browser, I get the permanent pinwheel on my status bar and the message "waiting for localhost". What am I missing? Does anyone out there have some experience with this particular issue? I'm using C# and ASP.NET in visual studios with sql server 2008.
My trainer came up with a brilliant solution, he shut down VS 2010 and restarted it. Problem solved.
Almost sounds like the database connection is going off neverland.
If your timeout on the connection and/or command is set pretty high, like 300 (which is 5 minutes) then it would appear to just hang forever if it is unable to make that connection.
The first thing I'd try is to set the connection timeout to something reasonable like 15 seconds in the web.config.
Then I'd run it again.
Assuming you get a connection failure, I'd use another tool to try and connect to the database using the settings in your web.config.
Does this only happen on debug (ie F5)?
If that is the case, my guess is that you are hitting a breakpoint?
If you hit a break point, the browser appears to be dead... but in fact VS is waiting on you to respond...
I found that creating a new app pool, then assigning the (already created) web site to it resolved this.
I shut down iis, stopped debugging the site in visual studio, and restarted with F5 ;-)
Try to not use localhost but your local ip address.
I had the same thing happen; If you are on a VPN connection, you may need to change your web.config file to use your database IP instead of the name (if you have DNS issues with VPN). This won't help the OP but someone else may find this useful.
This one may seem strange, but it might be caused if you're downloading torrents and your database is on a different server. This seemed to be my problem.
I had the same problem, but it was not solved by restarting Visual Studio, or by finding an endless loop. My issue was caused by user authentication failure.
Yesterday I published a web app to my company's server. IT set up the windows authentication for me with IIS, which they did with administrator rights. When I tried to debug my code afterwards I did not have a valid username/password. Instead of just giving a run-time error, the page loaded continuously.
My solution was to comment out the identity line in the web.config file.
//Comment out the line below
<identity impersonate="true" password="example" userName="domainName\administrator">
If by mistake console.writeline()is used in webform instead of Response.writeline or use console.readline () methods then webform will never display the output and will do processing for ever.
I spent SO many hours on this with none of the many suggestions on the web working.
For me... something was causing the file: app_offline.html to be written to the root directory of my project. Instead of showing me the message that the application had been taken offline, etc., it just waited forever with message "waiting on local host".
I removed the file and it suddenly was working again.
My problem occurred because I had an extra character in web.config
.
When I opened up a view it couldn't recognize @model
and when hovering over it said where the problem in the web.config
was.
From a similar question: asp.net waiting for localhost forever
Check firewall for blocked ports, change dynamic ports of application to some fixed port.
Changes in Firewall settings may be a leading cause.
精彩评论