This article was previously published under Q316920
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
When you use HttpServerUtility.Transfer("page name", true), you receive the following error message:
The View State is invalid for this page and might be corrupted
This problem occurs because the EnableViewStateMac attribute of the <pages> element is set to true by default. When this attribute is set to true, ASP.NET runs a message authentication check (MAC) on the view state of the page when the page is posted back from the client. This check determines if the view state of the page was modified on the client. For security purposes, it is recommended that you keep this attribute set to true.
When you call the Server.Transfer method and set the second parameter to true, you preserve the QueryString and the Form collections. One of the form fields is the hidden __VIEWSTATE form field, which holds the view state for the page. The view state message authentication check fails because the message authentication check only checks each page. Therefore, the view state from the page that calls Server.Transfer is not valid on the destination page.
View state is page scoped and is valid for that page only. View state should not be transferred across pages.
To resolve this problem, use one of the following methods.
Transfer values between pages to pass your server control values to the other pages. For more information, refer to the following MSDN documentation: