PDA

Visualizza la versione completa : [C#]Validation of viewstate MAC failed


Jackons
26-11-2013, 18:47
Salve a tutti,
Ho un problema con il mio sito web.
Da qualche giorno quando si tenta di accedere nell'area riservata del sito tramite form di login si presenta questo errore su alcuni dispositivi (windows xp e android no windows 7):

Server Error in '/' Application.

Validation of viewstate MAC failed. If this application is hosted by a
Web Farm or cluster, ensure that <machineKey> configuration specifies
the same validationKey and validation algorithm. AutoGenerate cannot
be used in a cluster.

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: Validation of viewstate
MAC failed. If this application is hosted by a Web Farm or cluster,
ensure that <machineKey> configuration specifies the same
validationKey and validation algorithm. AutoGenerate cannot be used in
a cluster.

Qualcuno sa come posso risolvere? Grazie

URANIO
26-11-2013, 20:47
che versione del framework .net stai usando?

Jackons
26-11-2013, 20:51
che versione del framework .net stai usando?

4.0

URANIO
26-11-2013, 20:57
prova a vedere qua:
http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx

Ma verifica che l'applicazione non stia girando in realtÓ con inferiore al 3.5

Jackons
26-11-2013, 21:32
Allora fino a qualche tempo fa l'applicazione girava su framework 2.0 poi Ŕ stata aggiornata a framework 4.0

Come verifico il framework reale?

Jackons
26-11-2013, 22:54
Questo potrebbe essere utile:


Server Error in '/' Application.

Validation of viewstate MAC failed. If this application is hosted by a
Web Farm or cluster, ensure that <machineKey> configuration specifies
the same validationKey and validation algorithm. AutoGenerate cannot
be used in a cluster.

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: Validation of viewstate
MAC failed. If this application is hosted by a Web Farm or cluster,
ensure that <machineKey> configuration specifies the same
validationKey and validation algorithm. AutoGenerate cannot be used in
a cluster.

Source Error:


[No relevant source lines]

Source File: App_Web_uij5tcqu.1.cs Line: 0

Stack Trace:


[ViewStateException: Invalid viewstate.
Client IP: 93.107.45.199
Port: 0
Referer:
http://www.apd.ie/Login.aspx?ReturnUrl=%2fOperators%2fOperators.aspx
Path: /Login.aspx
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/31.0.1650.57 Safari/537.36
ViewState:
/wEPDwUIMjQxODA0OTcPZBYCAgMPZBYEAgEPDxYCHgRUZXh0Bco kUFJFUEFSRSBERVRBSU
xFRCBCT0ZRIE9OIExBUkdFIFBST0pFQ1QgR0FMV0FZIENJVFkg LSBQUkVQQVJFIEEgREVU
QUlMRUQgQk9GUSBPTiBBIExBUkdFIFBST0pFQ1QgSU4gTElORS BXSVRIIEFSTSA0LCBQUk
VWSU9VUyBCSUxMUyBNVVNUIEJFIFNFRU4gQkVGT1JFIEFOWU9O RSBJUyBBUFBPSU5URUQs
IExPT0tJTkcgVE8gU1RBUlQgQVNBUCAtIFFVQU5USVRZIFNVUl ZFWU9SIC0gR0FMV0FZIC
0gMjYvMTEvMjAxMyAmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsm bmJzcDsmbmJzcDsmbmJz
cDsmbmJzcDsmbmJzcDsgSU5TVEFMTCBJTlNFUlQgU1RPVkUgJi BQTFVNIElUIFRPIEhFQV
RJTkcgTkFBUyAtIElOU1RBTEwgSU5TRVJUIFNUT1ZFIEFORCBQ TFVNIElUIFRPIEhFQVRJ
TkcgLSBQTFVNQkVSIC0gSEVBVElORyBDT05UUkFDVE9SIC0gS0 lMREFSRSAtIDI1LzExLz
IwMTMgJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5i c3A7Jm5ic3A7Jm5ic3A7
Jm5ic3A7IFJFSEFORyBJTlRFUk5BTCBET09SUyAtIEFOIElOVE VSTk...]

[HttpException (0x80004005): Validation of viewstate MAC failed. If
this application is hosted by a Web Farm or cluster, ensure that
<machineKey> configuration specifies the same validationKey and
validation algorithm. AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateException.ThrowError(Except ion inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+198
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString,
Purpose purpose) +432

System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter2.Dese
rialize(String serializedState, Purpose purpose) +8
System.Web.UI.Util.DeserializeWithAssert(IStateFor matter2
formatter, String serializedState, Purpose purpose) +40
System.Web.UI.HiddenFieldPageStatePersister.Load() +248
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +88
System.Web.UI.Page.LoadAllState() +36
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6704
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+245
System.Web.UI.Page.ProcessRequest() +72
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
+21
System.Web.UI.Page.ProcessRequest(HttpContext context) +58
ASP.login_aspx.ProcessRequest(HttpContext context) in
App_Web_uij5tcqu.1.cs:0

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecut
ionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step,
Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET (http://asp.net/) Version:4.0.30319.18045

Legnetto
28-11-2013, 19:34
In fondo alla sezione da te postata:

...
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.18045

Ciao
Legnetto

Loading