私はアプリケーションを開発し、リモートDB接続を使用してローカルで正常に動作しましたが、すべてのポストバックイベントでライブサーバーに配置すると、次の例外が発生します。
Server Error in '/openlearningsolutions' 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: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\openlearningsolutions\75c7e45d\68c7418e\App_Web_admin.aspx.cdcab7d2.ff0f08dc.0.cs Line: 0
Stack Trace:
[ViewStateException: Invalid viewstate.
Client IP: 182.177.92.68
Port: 18076
Referer: http://www.projects.azexsolutions.com/openlearningsolutions/admin.aspx
Path: /openlearningsolutions/admin.aspx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0
ViewState: /wEPDwUKMjAzNzcxOTA4Ng9kFgICAw8WAh4HZW5jdHlwZQUTbXVsdGlwYXJ0L2Zvcm0tZGF0YRYMAhEPZBYCAgUPEA8WBh4NRGF0YVRleHRGaWVsZAUKY291cnNlTmFtZR4ORGF0YVZhbHVlRmllbGQFCGNvdXJzZUlEHgtfIURhdGFCb3VuZGdkEBUAFQAUKwMAZGQCFQ9kFgICBQ8QDxYGHwEFCmNvdXJzZU5hbWUfAgUIY291cnNlSUQfA2dkEBUAFQAUKwMAFgBkAhkPZBYEAgUPEA8WBh8BBQpjb3Vyc2VOYW1lHwIFCGNvdXJzZUlEHwNnZBAVAQZTZWxlY3QVAQZTZWxlY3QUKwMBZxYBZmQCBw8QZGQWAGQCHQ9kFgICAQ8QDxYGHwEFCmNvdXJzZU5hbWUfAgUIY291cnNlSUQfA2dkEBUBDVNlbGVjdCBDb3Vyc2UVAQ1TZWxlY3QgQ291cnNlFCsDAWdkZAIhD2QWBgIBDxAPFgYfAQUKY291cnNlTmFtZR8CBQhjb3Vyc2VJRB8DZ2QQFQAVABQrAwAWAGQCAw8QZGQWAGQCCQ9kFgICAQ8WAh4Fc3R5bGUFxQJiYWNrZ3JvdW5kOnVybCgvb3BlbmxlYXJuaW5nc29sdXRpb25zL1dlYlJlc291cmNlLmF4ZD9kPU1VcVk1UGwybTBtNTJnRUI4a0JBOGJ0WTBiLW9hSWNxWmc1cVU3MjZGRUtEMzJYbnpsRTQ4XzBwUjhJSjVHYV...]
[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) +235
System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +274
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +241
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +106
System.Web.UI.Page.LoadAllState() +43
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.admin_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\openlearningsolutions\75c7e45d\68c7418e\App_Web_admin.aspx.cdcab7d2.ff0f08dc.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
サーバーではこのエラーが発生するのに、ローカルホストでは正常に機能するのはなぜですか?