Le jour où j’avais pensé que j’avais finit mon prototype d’appli en asp. Je viens de découvrir un gros message d’erreur qui apparait sous Internet Explorer 6.0 mais pas dans Firefox.
J’aimerai donc que le debugger de VS 2005 puisse me lancer Internet Explorer au lieu de Firefox. Malgré que j’ai définit IE comme navigateur par défaut (Option Internet -> Programmes -> cocher la vérification d’IE si il est le navigateur par défaut ). Je n’ai pas oublié de relancer IE pour lui dire d’etre mon nav par défaut. Mais VS veut absoluement du Firefox B) Du coup, je ne peux pas voir l’endroit exacte où l’erreur a été généré.
L’appli asp plante dès que je sélectionne une row de ma gridview, voici le message d’erreur généré par IE :
Server Error in ‘/TimeSheet’ Application.
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that 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 configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\timesheet\3ba49853\73acd0a7\App_Web_wvqmxsx7.0.cs Line: 0
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +397
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +293
[ViewStateException: Invalid viewstate.
Client IP: 127.0.0.1
Port:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
ViewState: X3awvf1DyAzYsLHsXKPz9+01/hCx8FSRhrh9CDBWHB043dFu5YcCySV8cBtpCU6rDkpR9J9XXq8wUFs/JvNVwvmKmjoKLXkhPYKEECAXkjPIqxRjaHU8FqHSWBppO0f2jlrM1q7vfnBwFBJ8w4H+WyH0ds5qoaWR
hlMoIcXWE+mErcpeXV4l2MADwSMr0p/wPTvKpMq2csPx7/IDy4cQn3xHaSkvxzK2WEma+mtuq2FG9uqWb6pNEObmnImRVxdw6TZUTqvzRg2bSzTtqDka7XZlaoDpxQ
WQ2zWRZJviCLwiVKuSILJOdaLD4VYyR+tDhXRSJZxHx8Ix9uefcS6ybGsQvh8aE/08UyjupjRoiAE/d7Ld3teX42YgYPB0h+tmJ5Y2XZE94N+NQ9vH2keEIF3gpCRc5R6DP1Aa2EXLpPFuKp3hLpGOxdWghtjH
yLLfY1K3Gc69aO7+V5XI20oXR3S/B+eh5zhQ57DZhI2Y4Iarj27YjC8JHFKEU+OarS5X/c9gshj+LcCgSlq2040wHWzy+4KU3qIBa2l4ipuM6rW8P+8/abaf+YX5FsgEJSBilFhowNEpJNVmO8/ywB7D8G955GVXp/h5G5yN9hXb94L2P4EndXhjc2nvIATSKNluDvayQ/9a4UT+y7J2YZOtwjcVeBdNMG5ubWMu8Un8/30eLdinpkg84aWljV+BB4FHgSJjRtorYZqF+pLFzqUSTnAO1+mBfXEjMkLQcumt0mUFzhZIRb7s1iRZv
pUTeAwRq1dGysdPNIqiMz4aXuQbyjMteM1SPpSIyRGbaVTQhtzG7eiZUS79u1NjxUae+K0JrO6H428Ut
2/0n9YQG4WgTMZQBQIVCR5GoN…]
[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +171
System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +37
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +328
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(Str
ing serializedState) +30
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +52
System.Web.UI.HiddenFieldPageStatePersister.Load() +256
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +137
System.Web.UI.Page.LoadAllState() +102
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5916
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +188
System.Web.UI.Page.ProcessRequest() +112
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +37
System.Web.UI.Page.ProcessRequest(HttpContext context) +135
ASP.admincontrol_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\timesheet\3ba49853\73acd0a7\App_Web_wvqmxsx7.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Ex
ecute() +401
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +117