YAFLogo

Posted by: bobwith5 - Tuesday, 10 June 2014 12:22:59
When ever I'm trying to post any new topic Im getting the below error. Can you please tell me how to resolve this issue. ____________________________________________________________________________ Server Error in '/' 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\v4.0.30319\Temporary ASP.NET Files\root\5ab8abfc\b17f62e8\App_Web_ylvox2ra.4.cs Line: 0 Stack Trace: [ViewStateException: Invalid viewstate. [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) +198 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +432 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose) +8 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +40 System.Web.UI.HiddenFieldPageStatePersister.Load() +248 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +88 System.Web.UI.Page.LoadAllState() +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6704 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245 System.Web.UI.Page.ProcessRequest() +72 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +58 ASP.forum_forum_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\5ab8abfc\b17f62e8\App_Web_ylvox2ra.4.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Posted by: tha_watcha - Tuesday, 10 June 2014 12:47:13
Which YAF Version? Did you have a machine key in your web.config as the error message suggests?

Posted by: bobwith5 - Tuesday, 10 June 2014 13:02:49
My YAF Version is YAF 2.0.0 This is my web.config file [code=xml]
[/code]

Posted by: tha_watcha - Tuesday, 10 June 2014 13:10:36
You need to add a machine key to your web.config, you can do that by generating one here [url=http://aspnetresources.com/tools/machineKey]http://aspnetresources.com/tools/machineKey[/url] and place it after the [code=xml][/code] [code=xml] [/code]

Posted by: bobwith5 - Tuesday, 10 June 2014 13:59:27
Thank you so much.It resolved my issue