Solved

asp.net Forms authentication expires before timeout with a error

Posted on 2010-09-05
4
708 Views
Last Modified: 2012-05-10
My application is hosted on a shared hosting plan so I don't have to much access to logs or settings, but if I'll be able to tell what cause's the problem I could ask the hosting company to fix it.

This is the error I get:

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\admin\4abedb3d\bfad2684\App_Web_xmkh49pj.0.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) +289
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +140

[ViewStateException: Invalid viewstate.
      Client IP: 66.128.11.20
      Port: 12865
      User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.5; Avant Browser; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; WinNT-PAI 21.07.2009)
      ViewState: /wEPDwULLTE1MDYzMzkwMDQPZBYCZg9kFgICAw9kFgYCAQ9kFgZmDw8WAh4EVGV4dAUaRnJpZGF5LCBTZXB0ZW1iZXIgMDMsIDIwMTBkZAIBDxBkZBYBZmQCCg8PFgIfAAUoV2VsY29tZSA8Zm9udCBjb2xvcj0jOTkwMzAzPmFkbWluPC9mb250PmRkAgMPZBYCAgEPDxYCHgdWaXNpYmxlZ2RkAgUPZBYGAgEPZBYCAgEPDxYCHwAFEU9yZGVyIFN0YXR1czogTmV3ZGQCAw8PFgIfAWhkZAIFD2QWAmYPZBYEAgEPZBYCZg9kFgICAQ8WAh4LXyFJdGVtQ291bnQCAhYEZg9kFgJmDxUCEkluZGV4LmFzcHg/aWQ9aG9tZQRIb21lZAICD2QWAmYPFQImSW5kZXguYXNweD9pZD1vcmRlcnMmc3RhdHVzPU5ldyZzdGF0PTEGT3JkZXJzZAIDDzwrAAsBAA8WCh8CAggeCERhdGFLZXlzFggCu6MBAsejAQL3owECm6QBArOkAQLLpAEC16QBAuOkAR4JUGFnZUNvdW50AgIeFV8hRGF0YVNvdXJjZUl0ZW1Db3VudAISHhBDdXJyZW50UGFnZUluZGV4AgFkFgJmD2QWEAICD2QWDGYPZBYCZg8VAQUyMDkyM2QCAQ8PFgIfAAULUmVnaW5hIENoYW5kZAICD2QWAmYPFQEJOC8yOS8yMDEwZAIDD2QWAmYPFQEHJDg5Ni43OWQCBA9kFgJmDw8WAh4LTmF2aWdhdGVVcmwFFWphdmFzY3JpcH...]

[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) +106
   System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +242
   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() +207
   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105
   System.Web.UI.Page.LoadAllState() +43
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.index_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\admin\4abedb3d\bfad2684\App_Web_xmkh49pj.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
0
Comment
Question by:Mr_Ezi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:richard_hughes
ID: 33607096
Hello Mr_Ezi

Do you have access to IIS at all?

Thanks,

Richard Hughes
0
 

Author Comment

by:Mr_Ezi
ID: 33607098
No I don't have access to the iis settings.
0
 
LVL 9

Accepted Solution

by:
richard_hughes earned 500 total points
ID: 33607105
Hello

Have a look here:

http://forums.asp.net/t/1166634.aspx

You may need to find out what your hosted machine key is from the hosting company if you can.

Thanks
0
 

Author Closing Comment

by:Mr_Ezi
ID: 33823404
I don't need to know the machine key from the company, there are online key generetors out there that did the job just fine.

Thanks
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question