.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

The state information is invalid for this page and might be corrupted.

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :.NET Framework
Dear All,     I got the following error today. But yesterday this application is running fine.     Even today i try to move this project to another server. The same symptom I got.     Does anyone know what's happened for this case?     Thanks, Best Regards, Benny Ng       Server Error in '/LGOldServices' Application.-------------------------------------------------------------------------------- The state information is invalid for this page and might be corrupted.Description: An unhandled exception occurred during the execution of thecurrent web request. Please review the stack trace for more informationabout the error and where it originated in the code. Exception Details: System.Web.HttpException: The state information isinvalid for this page and might be corrupted. Source Error: [No relevant source lines] Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NETFiles\lgoldservices\10b99f4d\fe7b353e\App_Web_jlz_zk70.4.cs    Line: 0 Stack Trace: [FormatException: Invalid character in a 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(StringserializedState) +4   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,String serializedState) +37   System.Web.UI.HiddenFieldPageState

View Complete Post

More Related Resource Links

The state information is invalid for this page and might be corrupted.


I am getting the "The state information is invalid for this page and might be corrupted." error while creating tabs using jquery. I am loading pages to the dynamically created div using jquery and when i click any of the buttons in the page i get this error. The created tabs are working fine.  Only thing is if i click any buttons that cause postback resulting in the above error. Help me please regarding this.

The state information is invalid for this page and might be corrupted.



I have read the full 6 pages (90 posts) of the thread http://forums.asp.net/7/1173230/ShowThread.aspx and tried just about every single suggestion. nothing has fixed this error.
Sorry for duplicate posting this, I posted this question in that forum thread as well but i have since realized that thread has the "answered" icon so i doubt i will get much help from posting in that thread...

My c# asp.net 2.0 website has not been upgraded from a 1.1 or 1.0 project. I built it from scratch, using 2.0 the whole time. (It would seem most people have this error due to an "upgrading from 1.1" issue, which isn't the case for me)

The error I am getting is:

The state information is invalid for this page and might be corrupted.

and my current web.config file looks like this:






validateRequest="false" >


The page(s) that produce this error are all on Firefox. I simultaneously run IE on the same pages to test things at the same time and find that IE has no conflicts whatsoever, these errors are occuring in Firef

The state information is invalid and might be corrupt? Check this.


I finally figured out why but don't know how to fix this.  I am storing a multi-dimensional array into a viewstate variable.  But when the page postsback, (BEFORE PAGE_LOAD) , i get the error in IE6 that the state information is invalid and might be corrupt.  Nothing else works, the PAGE_LOAD won't fire which I suspect it is stuck in pre_load during viewstate loading.

Here's the thing, the problem does not occur when storing a single-dimension array to viewstate. the problem ONLY occurs to storing a multi-dimensional array to viewstate.  The next time the page attempts to recycle, and then goes to load viewstate, it fails.

Here's the code.

//this function causes the viewstate error after subsequent postback.

bool[,] regsettings020 = new bool[5, 3];
ViewState["regsettings3"] = regsettings020; 
regsettings020 = (bool[,])ViewState["regsettings3"]; // just reading back for fun, it works

// this function does not cause the view state error because it only stored a single dimension array

bool[] regsettings020 = new bool[5];
ViewState["regsettings3"] = regsettings020; 
regsettings020 = (bool[])ViewState["regsettings3"]; // just reading back for fun, it works

CLR Inside Out: Handling Corrupted State Exceptions


There's a danger in using one-size-fits-all exception handling, and you need to know how to avoid it by being as specific as possible about how you handle errors.

Andrew Pardoe

MSDN Magazine February 2009

Maintain Controls State on Master Page.

I have Web Application which uses the Logged In User (Authenticated User) to query his Profile Data from Adabas/Unix using OLEDB. The application provides the user with about 21 different pages (Basic Info, Employment Info, Education, Dependants, Financial Info ...). The web application has a master page, and each profile data page is based on a User Control loaded in the Child ASPX Page. Since we are migrating our legacy applications from Adabas/Unix to SAP, the development Team has prepared web services to query for the same Profile Data from SAP using Web Services. Now, we have to modify the web application to consume the web services instead of using OLEDB to query Adabas. Since we are in the testing phase, and we have only very limited data in SAP, I have to provide temporary control to allow test query the Staff Profile for a Specified User (instead of the Authenticated User) and to select the Source: 1. SAP, or 2. Adabas.   So I am thinking to add the following "Control Section" in the Master Page:<div runat="server" id="divSAPTest" class="SAPTest"> <span>Test SAP Web Services. Enter Staff ID: </span> <asp:TextBox ID="txtSAPStaffID" runat="server" Width="60px"></asp:TextBox> <span>From: </span> <asp:DropDo

The site master page setting currently applied to this site is invalid. Please select a new master p

I have defined a new master page and set it as default for the main site.  Any time I create a new subsite it does not apply the new master page and defaults back to the default.master.  The Site Master Page Settings shows this error. The site master page setting currently applied to this site is invalid. Please select a new master page and apply it The system master page setting currently applied to this site is invalid. Please select a new master page and apply it. Now if I select "Inherit site master page from parent of this site" and "Inherit system master page" and click ok the site will use the new master page and everything is fine.  There is only one modification to the master page that was done so I know the master page isn't invalid.  Does anyone know the answer other than recreating the new master page.

how to maintain state of accordion pane from one page to another

 Hi,   I am using accordion control in one of my project. I want to maintain the state of the accordion pane when the user navigates from one page to another. Can someone help me  ?? Below given is the code of my accordion control I do not want to use query string because i am using url rewriting. <cc1:Accordion   ID="accNavMenu" runat="server" TransitionDuration="100"    FramesPerSecond="200" FadeTransitions="true" RequireOpenedPane="false"    OnItemDataBound="accNavMenu_ItemDataBound"   ContentCssClass="sidenav2" HeaderCssClass="sidenav"    HeaderSelectedCssClass="acc-selected">    <HeaderTemplate>    <asp:HiddenField ID="hdTemplate" runat="server"           Value='<%# DataBinder.Eval(Container.DataItem,"Template") %>'      />     <asp:HiddenField ID="hdSectionID" runat="server"           Value='<%# DataBinder.Eval(Container.DataItem,"SectionID") %>'      />    <table cellpadding="0" cellspacing=&quo

Retrieve Previous State Data on return from another page


I have a list page having date in repeater control. And also having some search criteria on the page. Using that I filter the data on the page. Now in repeater I have Edit button. Which allows me to open that record details in another page.
When I come back to list after saving or cancel, the filtered data is gone. I want to keep that filtered record with selected values in filter controls (checkbox, dropdown etc).
I have two options in my mind 1) Session, 2)

SharePoint 201 VS 2010 WF: PersistenceException: The security validation for this page is invalid


Setup: Visual studio 2010 SharePoint 2010 Workflow with custom infopath task edit form, with file attachment control. If I attach a file to the infopath task edit form, I got the following error message, though the attachment is saved, but the next task is not created and the current task is not marked as completed either.

09/27/2010 15:34:31.18     w3wp.exe (0x2B88)                           0x2844    SharePoint Foundation             Workflow Infrastructure           88xr    Unexpected    WinWF Internal Error, terminating workflow Id# 04621f32-17d4-439a-883a-7566b96481bb     
09/27/2010 15:34:31.18     w3wp.exe (0x2B88)                           0x2844    SharePoint Foundation             Workflow Infrastructure           98d4    Unexpected    System.Workflow.Runtime.Hosting.Pers

download a page lose authentication/session state


Hi All,

I have an issue of keeping the authentication and session state on a downloaded page, on the same website.

I have 2 pages, page 1 will download page 2, using the following code:

Page 1 code:

System.Net.WebClient webClient = new System.Net.WebClient();
byte[] buffer = webClient.DownloadData("http://www.mywebsite.co.uk/page2.aspx");
return Encoding.UTF8.GetString(buffer);

but the authentication is lost, so i needed to re-login in page 2 by writing auto login code myself.
But then the session is lost, so the session variables set in page 1 cannot be share to page 2, and vice versa.

Ideally, i needed page 2 to keep the authentication and session state when i call webClient.DownloadData()

Is there a way to do this?
Many thanks!

show state of query execution in web page


Hi all. I have a big query that it execute in 4 minutes. (for example an important trigger)

I want to show situation of query or count of records that is affected in every 10 second in to a web page.

what should I do? (please complete explain)

Three State Workflow Emails have invalid links


I've attached a standard three-state workflow to a document library.  When the emails arrive in users' inboxes, the links back to the document don't work if the document file name includes spaces.  It appears the workflow is not encoding the spaces, correctly.  If the message is opened in Lotus Notes, the spaces are completely stripped out (e.g. "My File Name" is "MyFileName").  If the message is opened in Gmail, the spaces are replaced with + signs.  (e.g. "My File Name" becomes "My+File+Name"). 

I've searched the forums and elsewhere, and I can't find any resolution for this.  To the best of my knowledge, no other emails, either from workflows or alerts, have this problem. Any suggestions?  This is on MOSS 2007, by the way.



Page - View State



I am confused about the View state in ASP.NET application. I was trying out something on a Web page, my observation was that the value which i entered on the text field on my ASP.NET web page persists after post back.

My assumption was that by default the EnableViewState is turned off for any web page. I put in the code Page.EnableViewState = False.

But still the value of the text entered in the text field persists after post back. Why is this?

Thanks in advance


Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page.


I am trying to display .swf [flash] in a publishing web part page. I am able to see my flash after applying the properties to web part.

When I am trying to check in I get:

"Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page."

Log says:

System.ArgumentException: Invalid SPListItem. The SPListItem provided is not compatible with a Publishing Page.    at Microsoft.SharePoint.Publishing.PublishingPage.GetPublishingPage(SPListItem sourceListItem)     at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageStateControl.RaisePostBackEventForPageRouting(String eventArgument, SPRibbonCommandHandler control, RaisePostBackEventDelegate raisePostBackEventDelegate)     at Microsoft.SharePoint.Publishing.Internal.WebControls.PublishingPageCheckinHandler.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Please suggest.



Need to save unique state for each PAGE (losing current filters)



Nutshell: App has the ability to show same page with different settings at the same time, and the session state is too broad for that. I need to have a set of states, one for each page. 

My web page can display a scorecard that allows user to view or change scores for one or more possible sports teams (I changed actual business requirements to keep problem simple). For example, Team 1 can have positive score for some aspects of a game and negative for other aspects of a game. This page can show one or more teams side by side for comparison. The ability to add teams to the view is called filtering. There can be more than one view in a browser's tabs or new windows.

Here are my problems:

1. If the user presses Browser Refresh, they lose all current filters unless I use Session or TempData. Using Form Post does not work here. 

2. However, solution 1 doesn't work for multiple pages where the user wants to bring up 2 different views of the same page (for example, page 1 has Teams 1 and 2, and Page 2 has Teams 3 and 4). They cannot do this using Session or TempData. This only works if I pass the current filters to the controller via a Post Form Data data or in the Url.

3. The use of a url won't work because the data that needs to pass to the controller sometimes exceeds 500 characters.

I have googled this to no

Cancel button Invalid page URL

I have created a page using SPD and inserted Custom List form . It has bought me the necessary Controls for each of the columns.
I have a save button which when clicked goes to a ThankYouPage.aspx by applying a queryString Source=ThankYou.aspx when the page is loaded.
My problem is the cancel button which when clicked says invalid URL. So how do I do a cancel button which when clicked goes to a page (as i did with a Save button)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend