R – Parser error in custom asp.net sharepoint page

asp.netmosssharepoint

Can anyone help me with this error?

alt text http://abbeylegal.com/downloads/parsererror.jpg

full image here

It happens usually once a day when trying to load any one of a number of custom asp.net pages in my sharepoint web site. If I recycle my application pool the error disappears (usually for the day).

So far this is what I’ve tried to eliminate the error (which has helped reduce the number of occurrences, but not solved it)

  1. Set the IIS_WPG, Local Service and Network Service account to Full Control permission
    on the folder

    %windir%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

  2. Added

    <machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="3DES" decryption="3DES"/>

    to the web.config file section.

  3. Recycle the application pool every two hours

Best Answer

My gut feeling is some sort of file locking issue. Have you tried running Process Monitor and having a look at the trace when this error occurs? Be warned that running it may sap some resources on your server.

To use, follow these steps. (You may also find Mark Russinovich's blog useful.)

  1. Set the filter so that it only displays the w3wp.exe process. This will reduce noise. The simplest way is to right-click on 'w3wp.exe' in the list and select Include 'w3wp.exe'.
  2. The monitor should have automatically started so now just wait until you receive the ASP.NET error. Make a note of the time the error occurs! It may also be reported in the SharePoint ULS log.
  3. Stop Process Monitor from capturing events (File, Capture Events) and narrow down to the time of the error.
  4. Look for the word 'FAIL' or 'ERROR' (you can use the program's find feature) and see if you can work out what's happening. You may need to remove the filter as the problem might have occurred with another process besides w3wp.exe.

There may also be interference with an anti-virus program as I've seen these lock files and cause problems on SharePoint before. Can you try disabling it to check if the error disappears? Alternatively, here are details of locations that need to be excluded so that SharePoint can operate correctly with a file-level virus scanner. You may need to add others, I don't believe that list is comprehensive.