开发者

Troubleshooting ASP .NET Application on Shared Hosting

My company has a CRM site hosted externally on a shared server and recently it has been very problematic. Users are being logged out randomly, sometimes only seconds after logging in. We are also getting viewstate validation er开发者_如何学运维rors at times. Both problems seem to occur more often when there are two or more people logged in at the same time, but I can't really see any particular pattern.

I am using log4net to track the application state and from what I can tell it seems that the application is frequently restarting, causing all sorts of issues. I can see log messages from the Application_Start event handler but there is not always a corresponding message from the Application_End event handler. There is also logging code in the Application_Error event handler but it is not catching anything at the time of the restart.

These errors started to occur soon after we moved our site to this shared server, although I don't remember it being this bad at first.

Any advice on how to track down these problems would be appreciated. The server is running Windows Server 2003 and IIS 6.0. Sadly I don't have access to the server other than through Parallels Plesk and it doesn't seem to have any useful diagnostic information.


Some hosters consequently restart your sites W3WP process if it consumes too much memory. Sometimes it doesn't need to consume more than 100 megs for them to kill the process.

You should start investigating that.


It sounds like you are using Application variables. You need to use Lock() and then Unlock() when changing the values of these variables. I have gotten all sorts of strange behaviour when two users have tried to concurrently change application variable values, and I guess this could cause an app pool to restart.

See this link for more information: http://msdn.microsoft.com/en-us/library/94xkskdf(VS.80).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜