Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asp.net Forms authentication expires before timeout with a error

Posted on 2010-09-05
4
Medium Priority
?
710 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
  • 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

783 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