Monday, 31 August 2009

ASP.NET: Server Application Unavailable

If you get this error when you try to access your ASP.NET application:

... it could be caused by a huge number of things.

It happened to me, and to get more information I went to the Event Viewer where some errors had showed up. Specifically these two errors:


This page is quite useful in explaining the potential problems and gives a few ideas for resolution. I went through a lot of them but the answer ended up being very simple.

The ASPNET user account somehow became locked out, so all I had to do was go into Control Panel > Administrative Tools > Computer Management > Local Users and Groups and look at the properties for the ASPNET account.

The account was marked as locked out, so I uncleared the checkbox and restarted IIS with an iisreset at the command line. Then I tried to access my application and it worked!

It was so straightforward, but I still have no idea why the account became locked out in the first place!