webForumDet fria alternativet

Felmeddelande

.NET

2 svar · 196 visningar · startad av inge

Medlem sedan sep. 2000498 inlägg
Frågan#1

Vad beror detta fel mess på?

The View State is invalid for this page and might be corrupted.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The View State is invalid for this page and might be corrupted.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The View State is invalid for this page and might be corrupted.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +149
System.Web.UI.Page.LoadPageViewState() +16
System.Web.UI.Page.ProcessRequestMain() +421

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0

Medlem sedan okt. 20005 273 inlägg
#2

Visa lite kod på vad du tror är fel.

Jag sökte lite på MS KB och hittade detta http://support.microsoft.com/default.aspx?scid=kb;en-us;Q323744
Kanske det kan hjälpa

mvh icaaq

Medlem sedan juni 20011 732 inlägg
#3

Din viewstate är den kod som håller minnet åt alla dina kontroller. VIewstatekoden finns i den webbsida som skickats ut till klienten (kolla view source på en aspx-sida så ser du att det finns en <input type="hidden"> innehållande en massa obegriplig kod. Så länge du har din sida öppen så finns således också din viewstat kvar. Om den här koden på något sätt är kopplad till exempelvis en session som ju försvinner efter ett tag (sessionen hålls ju i ramminnet på servern och försvinner, timeout, efter en given tid till skillnad från din viewstate) så får du det felmeddelandet du har skickat in ovan eftersom din viewstate behöver sessionen för att fungera.

278 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
126 ms — deklarationer (db)
0 ms — hämta statistik (cache)
148 ms — hämta tråd, inlägg och bilagor (db)
124 ms — ändringar (db)