Tuesday, April 28, 2009

The State Information is Invalid for this Page and might be Corrupted

Some other Errors are not code related and but they can be solved through the code. Am uploading the Xml file to ym DB and am using Infragistics Controls to do this , it will work for very small files but it will give you a problem with a larger Files. Here is the cause

Problem:

This comes, because from version 2.2.2, we made the RadUploadHttpModule parse the files when used with the Cassini web server. I believe you have encountered a similar problem - the request data is not read properly by the RadUploadHttpModule and corrupt ViewState data is passed to the page. and you finnaly get the error

The case-sensitive value that the TemplateSourceDirectory property of a page returns is used to create and to validate the ViewState property for that page. The value of this property for a page depends on the case-sensitive URL that the first user for that page requested. This value is reused for the remaining requests for that page until that page is recompiled. When the page is recompiled, the TemplateSourceDirectory property is re-initialized. If the new value (which is case-sensitive) differs from the previous value, the ViewState validation from the existing clients fails.


The State Information is Invalid for this Page and might be Corrupted

Resolutions:

  1. Someone else reported the same error and seemed to have found a workaround by causing his upload button PostbackUrl to go to the same page like this

btnAddFile.PostBackUrl = "~/NewsAddFiles.aspx?NewsId=" + hiddenNewsId.Value;

2. Download a hotFix http://support.microsoft.com/default.aspx?scid=kb;ko;323744

http://support.microsoft.com/ph/1173#tab0

3: Save the radion button selection and tree control node selection in session variables instead of view state, because the life scope of the view state is only within the page. When user navigates away to a different page, the view state of the previous page is destroyed.

Hope this This Helps

Vuyiswa Maseko

No comments:

Post a Comment