Monday, March 23, 2009

asp.net crashes

I thought I would note some possible causes of the evil "server application unavailable" message when you try to view an ASP.NET application. It always helps to check your Event Log messages, too.

1) Cause: Incorrect file-system-level permissions. Solution: set the Windows permissions of your web site source code top-level folder to at least allow "Read & Execute", "List Folder Contents", and "Read" access for the following user accounts, where "MyMachineName" is your local machine's name.
- MyMachineName\IUSR_MyMachineName
- MyMachineName\IWAM_MyMachineName
- MyMachineName\ASPNET

2) Cause: Infinite recursion (stack overflow). Solution: fix your code so a method can't call itself infinity times.

3) Cause: Infinite memory allocation (heap overflow). Solution: something in your code is infinitely requesting memory. Check for a spot in your code where a new command is used in an infinite loop or some other situation where it's repeatedly instantiating objects.

No comments: