简体   繁体   中英

ASP.NET site won't start under IIS

ASP.NET, Visual Studio 2010, Windows 8, IIS 8.

I have an ASP.NET site that I pulled from my client's source control. It runs fine under the Visual Studio Development Server but a few things don't work correctly when it's not running under IIS.

When I set it up to run in IIS, it initially gave me a 500 error due to IIS_IUSRS not having permission to read the web.config.

I fixed that, and now it starts, but the browser just sits there saying 'Connecting' indefinitely if I browse to the site - it doesn't even time out.

If I try to launch it from VS, it does something similar except after a while times out and says that it can't attach the debugger. I've read the various posts here and elsewhere about that 'can't attach debugger' message and either they don't apply to me or the proposed solutions don't make any difference.

I've checked the normal IIS logs, enabled Failed Request Tracing and checked those - nothing, it doesn't seem to even get that far. I've tried changing the application pool settings etc. and that doesn't make any difference.

Can anybody suggest anything else that I can try in order to figure out what's happening here?

I acknowledge that you have already said that you have tried changing your app pool settings. However, you didn't say which settings you tried.

I generally touch the following whenever I set up an IIS Site:

  • .NET Framework Version
  • Enable 32-bit applications (I frequently to work with managed dlls that are 32-bit only)
  • Managed Pipeline Mode
  • Identity

Double check/play with the values you have for these settings under IIS.

Another thing worth checking is your sessionState element in your web.config. In my experience an incorrectly configured sessionState gives a google-able error, but it is plausible to me that there could be something going on with session persistence that hasn't been fully persisted into your website.

Also consider your impersonation. Again: In my experience an incorrect impersonation will error quickly. But if you're using a domain account then it seems plausible that this could be failing to resolve and causing your app pool to hang.

How are you deploying to IIS? Are you dumping your source code into IIS, or are you compiling and publishing a Web Application? Whichever of the two you are trying, consider trying the other.

Are you putting up a release build or a debug build of your web application? Whichever you're trying that is in error, give the other a try and see if that works.

Be mindful of security here: Test giving your app pool an administrator identity. This is a bad solution in the long run, but if your website works when running under an administrator account then this would narrow down your problem area to being permissions related.

That's all I can think of to try given the information presented so far. Can you think of anything else that might be relevant?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM