PDA

View Full Version : یک پیغام خطاء



ebrahimhoze
شنبه 27 بهمن 1386, 12:32 عصر
من نمیدونم این پیغام برای چیه debugr رو هم برابر true قرار دادم توی صفحه

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:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDeco dedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2646292
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +214

[ViewStateException: Invalid viewstate.
Client IP: 85.185.37.25
Port: 46400
User-Agent: Opera/9.50 (Windows NT 5.1; U; en)
ViewState: /wEPDwULLTE2MjI4MzEzOTkPZBYCZg9kFgICAw9kFgQCDw9kFgI CAQ88KwANAQAPFgYeC18hRGF0YUJvdW5kZx4JUGFnZUNvdW50A gEeC18hSXRlbUNvdW50AgJkFgJmD2QWCmYPDxYCHgdWaXNpYmx laGRkAgEPZBYCZg9kFgQCAw8PFgIeBFRleHQFL9iq2LrbjNuM2 LEg2KfYs9qp24zZhiDZgdix2YUg2KjZhyDYotmB24zYsyAyMDA 3ZGQCBQ8PFgIfBAWkCzxGT05UIGZhY2U9VGFob21hIHNpemU9M j7Yqti624zbjNixINin2LPaqduM2YYg2YHYsdmFINio2Ycg2KL ZgduM2LMgMjAwNzxCUj7Yrdiq2YXYpyDYqtinINio2Ycg2K3Yp 9mEINiv2YTYqtmI2YYg2K7ZiNin2LPYqtmHINqp2Ycg2KjYpyD YptuM2pjZiNin2YQg2KjbjNiz24zaqSA2INuM2qkg2YHYsdmFI Ni32LHYp9it24wg2qnZhtuM2YYg2qnZhyDahtmH2LHZhyDYstu M2KjYpyDZiCDar9ix2KfZgduM2qnbjCDYqNmHINiu2YjYr9i0I Niv2KfYtNiq2Ycg2KjYp9i02Ycg2K7ZiNioINmF2Kcg2KfbjNm GINin2YXaqdin2YYg2LHZiCDYqNix2KfYqtmI2YYg2KrZiNuMI Nin24zZhiDZhdis2YXZiNi52Ycg2KLZhdmI2LLYtNuMINmB2LH Yp9mH2YUg2qnYsdiv24zZhSDaqdmHINmF24zYqtmI2YbbjNmGI NmB2LHZhSDZh9in24wg2K7ZiNiv2KrZiNmG2Ygg2YXYq9mEINi i2YHbjNizIDIwMDcg2Iwg2KLZgduM2LMgMjAwMyDYjCDZiCDYq NmHJm5ic3A72obZht...]

[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) +116
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +251
System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6978
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

raravaice
شنبه 27 بهمن 1386, 13:13 عصر
http://barnamenevis.org/forum/showthread.php?t=81467

http://barnamenevis.org/forum/showthread.php?t=81256

http://msdn2.microsoft.com/en-us/library/system.web.ui.page.enableviewstatemac.aspx


http://aspadvice.com/blogs/joteke/ar.../02/15011.aspx (http://aspadvice.com/blogs/joteke/archive/2006/02/02/15011.aspx)

و

http://connect.microsoft.com/VisualS...dbackID=101988 (http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101988)

و

http://blogs.msdn.com/somasegar/arch...18/601354.aspx (http://blogs.msdn.com/somasegar/archive/2006/05/18/601354.aspx)

و

http://forums.asp.net/1173230/ShowPost.aspx

ebrahimhoze
شنبه 27 بهمن 1386, 17:38 عصر
من کاری رو که شما گفته بودید رو انجام دادم ولی بازم پیغام میده
این کد
شماست

<pages enableViewState="true" enableViewStateMac="false" />
و اینم پیغام خطاء

Server Error in '/Monester' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Sections must only appear once per config file. See the help topic <location> for exceptions.

Source Error:


Line 54: <authentication mode="Windows"/>
Line 55: <customErrors mode="Off" />
Line 56: <pages enableViewState="true" enableViewStateMac="false" />
Line 57: <!--
Line 58: The <customErrors> section enables configuration


Source File: E:\website\Monester\web.config Line: 56


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

raravaice
شنبه 27 بهمن 1386, 18:05 عصر
ظاهر که نشون میده داری از 2 استفاده میکنی ولی برادر من یه کم دقت کنی میبینی که توی web.config یه تگ pages دیگه هم هست که شما اون 2 تا پارامتر رو باید اونجا بزاری نه تو یه تگ دیگه با همین اسم چون 2 تگ همنام منجر به بروز خطا میشه.

موفق باشید

ebrahimhoze
شنبه 27 بهمن 1386, 18:30 عصر
آقا قربون دستت من اصلا تو کارام دقیق نیستم

raravaice
شنبه 27 بهمن 1386, 18:40 عصر
حیفه میزان تشکر رو فابریک روی 0 نگه داری به جاش یه پست بزنی ;)

موفق باشی