Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure t

W

Walo

I searched in the internet and there was no solution that worked for
me. The funny thing is, that the same application work fine on a
different server.

Thanks for every help!

Here is the complete Error-Code:

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: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.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)
+2546764
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+214


[ViewStateException: Invalid viewstate.
Client IP: 146.159.26.39
Port: 2247
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: /wEPDwUJMjk2NTc0NzkzZGQn2gvYVk8zb1xIq0Qh0GLgA3/xpA==

Referer:
http://mekbuda.gd.ad.prod/konzessionen-rtvg.gd/Login.aspx?ReturnUrl=%...

Path: /konzessionen-rtvg.gd/Login.aspx]


[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(Exception inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+251


System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserializ­e(String

serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.login_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.cs:0


System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt­ep.Execute()

+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&

completedSynchronously) +64


---------------------------------------------------------------------------­-----

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

Guest

Hi Walo,

Please try this fix if.. add the below given code into your web.config or
the file that you are executing and see if your issue gets fixed. and let me
know if this was helpfull.

"
<system.web>
<pages enableViewStateMac="false" />
</system.web>
"

Or

edit the page that is getting loaded

<%@ xyz....xyz...** Inherits="MyAssembly.MyPage" enableViewStateMac="False" %>

" enableViewStateMac="False" "

my mail id is (e-mail address removed)....bye


Walo said:
I searched in the internet and there was no solution that worked for
me. The funny thing is, that the same application work fine on a
different server.

Thanks for every help!

Here is the complete Error-Code:

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: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.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)
+2546764
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+214


[ViewStateException: Invalid viewstate.
Client IP: 146.159.26.39
Port: 2247
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: /wEPDwUJMjk2NTc0NzkzZGQn2gvYVk8zb1xIq0Qh0GLgA3/xpA==

Referer:
http://mekbuda.gd.ad.prod/konzessionen-rtvg.gd/Login.aspx?ReturnUrl=%...

Path: /konzessionen-rtvg.gd/Login.aspx]


[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(Exception inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+251


System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserializ­e(String

serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.login_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.cs:0


System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt­ep.Execute()

+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&

completedSynchronously) +64


---------------------------------------------------------------------------­-----

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

Guest

This fixed my problem in not getting the notices everytime a users click on a
specific .aspx files that will automaticall generate the message(MAC Failed)

but it seems that this will only OFF the notices. Thanks for that.

what could be the problem? (any specific?)

Please Help. Thanks



Walo said:
I searched in the internet and there was no solution that worked for
me. The funny thing is, that the same application work fine on a
different server.

Thanks for every help!

Here is the complete Error-Code:

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: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.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)
+2546764
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+214


[ViewStateException: Invalid viewstate.
Client IP: 146.159.26.39
Port: 2247
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: /wEPDwUJMjk2NTc0NzkzZGQn2gvYVk8zb1xIq0Qh0GLgA3/xpA==

Referer:
http://mekbuda.gd.ad.prod/konzessionen-rtvg.gd/Login.aspx?ReturnUrl=%...

Path: /konzessionen-rtvg.gd/Login.aspx]


[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(Exception inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+251


System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserializ­e(String

serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.login_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.cs:0


System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt­ep.Execute()

+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&

completedSynchronously) +64


---------------------------------------------------------------------------­-----

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

Guest

This fixed my problem in not getting the notices everytime a users click on a
specific .aspx files that will automaticall generate the message(MAC Failed)

but it seems that this will only OFF the notices.

what could be the specific problem? (any specific?)

Please Help. Thanks



************************************************************

Praveen said:
Hi Walo,

Please try this fix if.. add the below given code into your web.config or
the file that you are executing and see if your issue gets fixed. and let me
know if this was helpfull.

"
<system.web>
<pages enableViewStateMac="false" />
</system.web>
"

Or

edit the page that is getting loaded

<%@ xyz....xyz...** Inherits="MyAssembly.MyPage" enableViewStateMac="False" %>

" enableViewStateMac="False" "

my mail id is (e-mail address removed)....bye


Walo said:
I searched in the internet and there was no solution that worked for
me. The funny thing is, that the same application work fine on a
different server.

Thanks for every help!

Here is the complete Error-Code:

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: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.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)
+2546764
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+214


[ViewStateException: Invalid viewstate.
Client IP: 146.159.26.39
Port: 2247
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: /wEPDwUJMjk2NTc0NzkzZGQn2gvYVk8zb1xIq0Qh0GLgA3/xpA==

Referer:
http://mekbuda.gd.ad.prod/konzessionen-rtvg.gd/Login.aspx?ReturnUrl=%...

Path: /konzessionen-rtvg.gd/Login.aspx]


[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(Exception inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+251


System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserializ­e(String

serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.login_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.cs:0


System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt­ep.Execute()

+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&

completedSynchronously) +64


---------------------------------------------------------------------------­-----

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

Alvin Bruney [MVP]

See if there is a fix here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;555353

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless Author Plug
OWC Black Book 2nd Edition
Exclusively on www.lulu.com/owc
$24.99


Emman said:
This fixed my problem in not getting the notices everytime a users click
on a
specific .aspx files that will automaticall generate the message(MAC
Failed)

but it seems that this will only OFF the notices.

what could be the specific problem? (any specific?)

Please Help. Thanks



************************************************************

Praveen said:
Hi Walo,

Please try this fix if.. add the below given code into your web.config or
the file that you are executing and see if your issue gets fixed. and let
me
know if this was helpfull.

"
<system.web>
<pages enableViewStateMac="false" />
</system.web>
"

Or

edit the page that is getting loaded

<%@ xyz....xyz...** Inherits="MyAssembly.MyPage"
enableViewStateMac="False" %>

" enableViewStateMac="False" "

my mail id is (e-mail address removed)....bye


Walo said:
I searched in the internet and there was no solution that worked for
me. The funny thing is, that the same application work fine on a
different server.

Thanks for every help!

Here is the complete Error-Code:

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: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.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)
+2546764
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+214


[ViewStateException: Invalid viewstate.
Client IP: 146.159.26.39
Port: 2247
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: /wEPDwUJMjk2NTc0NzkzZGQn2gvYVk8zb1xIq0Qh0GLgA3/xpA==

Referer:
http://mekbuda.gd.ad.prod/konzessionen-rtvg.gd/Login.aspx?ReturnUrl=%...

Path: /konzessionen-rtvg.gd/Login.aspx]


[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(Exception inner, String
persistedState, String errorPageMessage, Boolean macValidationError)
+116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
+251


System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserializ­e(String

serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.login_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\konzessionen-rtvg.gd\104dd2aa\1bab3e30\App_Web_ylotuhwm.30.cs:0


System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSt­ep.Execute()

+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&

completedSynchronously) +64


---------------------------------------------------------------------------­-----

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

Praveen

Hi Alvin,

Below mentioned were some fix for this issue...when it comes to shared
hosting how far will this work and again FYI windows server with no firewall
and No AV is best to be thrown in garbage as it will be of zero
use...Microsoft plese give some sensible fix if not please leave us to get
them fixed in some ways that does not make things complicated...

RESOLUTION
1. Adjust the settings on the application pools so that recycling is less
likely to occur at peak periods.
2. Use a specific key in the machine.config to prevent automatic key
generation on each process start
3. Only post to the same ASPX page
4. Turn off firewall and antivirus software

Above were the solutions...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top