Thursday, November 29, 2007

TSWA 2005 crashes (Attempted to read or write protected memory)

A while back when we started using Team System Web Access 2005 we bumped into a problem with the website crashing sometimes several times during a day displaying the following error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
we where able to get around it by manually go in an recycle the application pool for TSWA (which temporarily solve the problem).

Clearly this was not a sufficient solution so after chatting about it with the good folks over in Redmond they where able to pinpoint the problem (this is as far as I know only a problem in TSWA 2005). To solve the problem you need to do the following:

Switch TSWA over to use shared WIT cache mode which can be done by adding the following entry in the web.config for TSWA:
<configuration>

<appSettings>
<add key="WorkItemTrackingCacheRoot" value="C:\FolderForCache" />
</appSettings>

</configuration>
After we added this entry we have experienced no problems with this.

No comments:

Post a Comment