Sys.WebForms.PageRequestManagerParserErrorException…

Problem

You get this error when running your application:

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

When authentication is turned on, a session time out will cause a Sys.WebForms.PageRequestManagerParserErrorException when a post back occurs on a control with smooth panels turned on.  Response.write is not compatible with updatepanel which causes this error.

Solution

See:

http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx

Override the RedirectToLoginPage method in:

…\app_code\shared\BaseApplicationPage.cs or .vb

Visual Basic .NET:

Public Overrides Sub RedirectToLoginPage()

     Dim loginUrl As String = BaseClasses.Configuration.ApplicationSettings.Current.SignInPageUrl()

 

     If (NetUtils.IsEqual(Me.Request, loginUrl)) Then

          Return

     End If

 

     Me.SystemUtils.shouldRollBackTransaction = True

     Me.SystemUtils.shouldDisplayTransactionError = False

 

     Me.Response.ClearContent()

     Me.SetResponseUncacheable()

     Me.Response.Redirect(loginUrl)

     'NetUtils.RedirectClientLocation(loginUrl, Me.Response, True)

 

End Sub

See Also

Part VII:  Troubleshooting Applications

Application Won’t Run

Application Runs But No Data is Displayed

Application Error Messages