The status information on this page is invalid and may be corrupted-server errors in the application-

Source: Internet
Author: User
Tags stack trace

Today, I used jquery to perform a logon experiment. After clicking the logon button, the title is incorrect/

The online conclusion is:

Problem description: page A. aspx uses ajax to load B. aspx for paging. However, there is a server-side control in page a that needs to interact with the server to complete some functions.

However, an error message is displayed when you click the Server Control to prepare to interact with the server:


The status information of this page is invalid and may be damaged. 

Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details: system. Web. httpexception: The status information of this page is invalid and may be damaged.

Source error:


[No relevant source line]

Source File: C: \ WINDOWS \ Microsoft. NET \ framework \ v2.0.50727 \ temporary ASP. Net files \ teacherwebsite \ aba2332f \ c906139a \ app_web_ppk8ycdo.10.cs row: 0

Stack trace:


[Formatexception: invalid characters in the base-64 string.]

System. Convert. frombase64string (string s) + 0

System. Web. UI. objectstateformatter. deserialize (string inputstring) + 67

System. Web. UI. objectstateformatter. system. Web. UI. istateformatter. deserialize (string serializedstate) + 4

System. Web. UI. util. deserializewithassert (istateformatter formatter, string serializedstate) + 37

System. Web. UI. hiddenfieldpagestatepersister. Load () + 136



The following solutions are provided for online query:

Add the following code to Web. config in the project:

<Pages enableeventvalidation = "false" viewstateencryptionmode = "never"/>


However, the method provided on the Internet does not solve the problem.

So, see: which says:

If you do not add these two sentences before the callback, _ theformpostdata adds the existing webpage status post data based on the original one,Now you have included two copies of post data in the callback.But the server still treats the callback as a part. As a result, the server cannot analyze the post data and only returns a message indicating that the webpage status is damaged.

Analysis may be caused by a form on the B page. Therefore, the form tag in B. aspx is deleted. The problem is solved.

My source code:


 <% @ Page Language = "C #" autoeventwireup = "true" codefile = "logion. aspx. cs" inherits = "logion" %>

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "">

<HTML xmlns = "">
<Head runat = "server">
<SCRIPT type = "text/JavaScript" src = "JS/jquery-1.4.2.min.js"> </SCRIPT>
<Title> No title page </title>
<SCRIPT type = "text/JavaScript">
$ (Function (){
VaR messagetext = "";
$ ("# Tbxuser"). Focus (function (){
If ($ ("# messageuser"). Text () = "can be registered! ")
$ ("# Messageuser" Login .html ("You can register! "). Show ();
If ($ ("# messageuser"). Text () = "") $ ("# messageuser" ).html ("* User name starts with a letter or number! "). Show ();
// Else $ ("# messageuser" pai.html ("* username starts with a letter or number! "). Show ();
$ ("# Tbxuser"). Blur (function (){
VaR Param = $ ("# tbxuser"). Val ();
$ ("# Messageuser"). Load ("ajaxdata. aspx? Username = "+ Param, function (responsetext, textstatus, XMLHttpRequest ){
$ ("# Messageuser" pai.html (responsetext). Show ();
Messagetext = $ ("# messageuser"). Text ();
Function () {location. href = "index. aspx "};
Alert ("AA ");
<Style type = "text/CSS">
<! --
* {Margin: 0; padding: 0 ;}
. Logion {width: 400px; Height: 25px ;}
. Beformessage {float: Left ;}
. Showmessage {float: Left; margin-left: 15px; display: none; font-size: 12px; color: red ;}
# Logionbutton {margin-left: 64px ;}
# Yanzhen {float: Left ;}


In the code, the $ ("# messageuser"). Load () method of jquery on the logion. ASP page is named ajaxdata. aspx.

In this case, the ajaxdata. ASPX page contains from and logion. asp also has from. Therefore, two post data copies are included in the callback, And the from Form Error in ajaxdata. aspx deletion is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.