Hello,
I have a web project (VS 2008 c#). I have a page that opens, but when I try
to call an assembly (managed c++) on a submit event, I get the following
error on the web server, but not on my development machine. It seems that
this is the only dll in the Bin folder that has this problem. Any help with
this would be appreciated.
Thanks, sck10
Validation of viewstate MAC failed. If this application is hosted by a Web
Farm or cluster, ensure that <machineKeyconf iguration 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.Http Exception: Validation of viewstate MAC
failed. If this application is hosted by a Web Farm or cluster, ensure that
<machineKeyconf iguration specifies the same validationKey and validation
algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\ee31 8654\cc1d961a\A pp_Web_license. aspx.a0baaa50.5 m89g2lw.0.cs
Line: 0
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Conf iguration.Machi neKeySection.Ge tDecodedData(By te[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +294
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +203
[ViewStateExcept ion: Invalid viewstate.
Client IP: 135.185.49.144
Port: 1545
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648;
..NET CLR 3.5.21022)
ViewState:
/wEPDwUKMTcwMDU3 NDA4Mw9kFgJmD2Q WAgIDD2QWDgIDDx YCHgRUZXh0BQxMa WNlbnNlIEZvcm1k AgUPFgIfAAUFMTE 6MzlkAgcPFgIfAA UFMTc6MzlkAgkPF gIfAAUFMjM6Mzlk AgsPFgIeC18hSXR lbUNvdW50AiAWQA IBD2QWBAIBDxYCH wBkZAICDxUBHzxz cGFuIGNsYXNzPSJ CbHVlQiI+R1NUVD wvc3Bhbj5kAgIPZ BYEAgEPFgIfAGRk AgIPFQE0PGEgaHJ lZj0iLi4vLi4vZG VmYXVsdC5hc3B4I iB0YXJnZXQ9Il9z ZWxmIj5Ib21lPC9 hPmQCAw9kFgQCAQ 8WAh8ABVk8dHI+P HRkIHN0eWxlPSd3 aWR0aDoxMDAlOyB oZWlnaHQ6MnB4Oy c+PGhyIHN0eWxlP Sdjb2xvcjogIzJE NTk4Njsgc2l6ZTo xcHgnIC8+PC90ZD 48L3RyPmQCAg8VA Sg8c3BhbiBjbGFz cz0iQmx1ZUIiPkN 1c3RvbWVyIENhcm U8L3NwYW4+ZAIED 2QWBAIBDxYCHwBk ZAICDxUBNzxhIGh yZWY9Ii4uLy4uL3 hhc3B4cy9zY19jY 3MvIiB0YXJnZXQ9 Il9zZWxmIj5JbnR ybzwvYT5kAgUPZB YEAgEPFgIfAAVZP HRyPjx0ZCBzdHls ZT0nd2lkdGg6MTA wJTsgaGVpZ2h0Oj JweDsnPjxociBzd HlsZT0nY29sb3I6 ICMyRDU5ODY7IHN pemU6MXB4JyAvPj wvdGQ+PC90cj5kA gIPFQEnPHNwYW4. ..]
[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.V iewStateExcepti on.ThrowError(E xception inner, String
persistedState, String errorPageMessag e, Boolean macValidationEr ror) +267
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +282
System.Web.UI.O bjectStateForma tter.System.Web .UI.IStateForma tter.Deserializ e(String
serializedState ) +4
System.Web.UI.U til.Deserialize WithAssert(ISta teFormatter formatter,
String serializedState ) +37
System.Web.UI.H iddenFieldPageS tatePersister.L oad() +198
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium() +83
System.Web.UI.P age.LoadAllStat e() +35
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +7350
System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint,
Boolean includeStagesAf terAsyncPoint) +213
System.Web.UI.P age.ProcessRequ est() +86
System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context) +18
System.Web.UI.P age.ProcessRequ est(HttpContext context) +49
ASP.xaspx_db_cc s_license_aspx. ProcessRequest( HttpContext context) in
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\ee31 8654\cc1d961a\A pp_Web_license. aspx.a0baaa50.5 m89g2lw.0.cs:0
System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute()
+358
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.1433;
ASP.NET Version:2.0.507 27.1433
I have a web project (VS 2008 c#). I have a page that opens, but when I try
to call an assembly (managed c++) on a submit event, I get the following
error on the web server, but not on my development machine. It seems that
this is the only dll in the Bin folder that has this problem. Any help with
this would be appreciated.
Thanks, sck10
Validation of viewstate MAC failed. If this application is hosted by a Web
Farm or cluster, ensure that <machineKeyconf iguration 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.Http Exception: Validation of viewstate MAC
failed. If this application is hosted by a Web Farm or cluster, ensure that
<machineKeyconf iguration specifies the same validationKey and validation
algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
[No relevant source lines]
Source File: c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\ee31 8654\cc1d961a\A pp_Web_license. aspx.a0baaa50.5 m89g2lw.0.cs
Line: 0
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Conf iguration.Machi neKeySection.Ge tDecodedData(By te[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +294
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +203
[ViewStateExcept ion: Invalid viewstate.
Client IP: 135.185.49.144
Port: 1545
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648;
..NET CLR 3.5.21022)
ViewState:
/wEPDwUKMTcwMDU3 NDA4Mw9kFgJmD2Q WAgIDD2QWDgIDDx YCHgRUZXh0BQxMa WNlbnNlIEZvcm1k AgUPFgIfAAUFMTE 6MzlkAgcPFgIfAA UFMTc6MzlkAgkPF gIfAAUFMjM6Mzlk AgsPFgIeC18hSXR lbUNvdW50AiAWQA IBD2QWBAIBDxYCH wBkZAICDxUBHzxz cGFuIGNsYXNzPSJ CbHVlQiI+R1NUVD wvc3Bhbj5kAgIPZ BYEAgEPFgIfAGRk AgIPFQE0PGEgaHJ lZj0iLi4vLi4vZG VmYXVsdC5hc3B4I iB0YXJnZXQ9Il9z ZWxmIj5Ib21lPC9 hPmQCAw9kFgQCAQ 8WAh8ABVk8dHI+P HRkIHN0eWxlPSd3 aWR0aDoxMDAlOyB oZWlnaHQ6MnB4Oy c+PGhyIHN0eWxlP Sdjb2xvcjogIzJE NTk4Njsgc2l6ZTo xcHgnIC8+PC90ZD 48L3RyPmQCAg8VA Sg8c3BhbiBjbGFz cz0iQmx1ZUIiPkN 1c3RvbWVyIENhcm U8L3NwYW4+ZAIED 2QWBAIBDxYCHwBk ZAICDxUBNzxhIGh yZWY9Ii4uLy4uL3 hhc3B4cy9zY19jY 3MvIiB0YXJnZXQ9 Il9zZWxmIj5JbnR ybzwvYT5kAgUPZB YEAgEPFgIfAAVZP HRyPjx0ZCBzdHls ZT0nd2lkdGg6MTA wJTsgaGVpZ2h0Oj JweDsnPjxociBzd HlsZT0nY29sb3I6 ICMyRDU5ODY7IHN pemU6MXB4JyAvPj wvdGQ+PC90cj5kA gIPFQEnPHNwYW4. ..]
[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.V iewStateExcepti on.ThrowError(E xception inner, String
persistedState, String errorPageMessag e, Boolean macValidationEr ror) +267
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +282
System.Web.UI.O bjectStateForma tter.System.Web .UI.IStateForma tter.Deserializ e(String
serializedState ) +4
System.Web.UI.U til.Deserialize WithAssert(ISta teFormatter formatter,
String serializedState ) +37
System.Web.UI.H iddenFieldPageS tatePersister.L oad() +198
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium() +83
System.Web.UI.P age.LoadAllStat e() +35
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +7350
System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint,
Boolean includeStagesAf terAsyncPoint) +213
System.Web.UI.P age.ProcessRequ est() +86
System.Web.UI.P age.ProcessRequ estWithNoAssert (HttpContext context) +18
System.Web.UI.P age.ProcessRequ est(HttpContext context) +49
ASP.xaspx_db_cc s_license_aspx. ProcessRequest( HttpContext context) in
c:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\ee31 8654\cc1d961a\A pp_Web_license. aspx.a0baaa50.5 m89g2lw.0.cs:0
System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on.IExecutionSt ep.Execute()
+358
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.1433;
ASP.NET Version:2.0.507 27.1433
Comment