Solved

asp.net Forms authentication expires before timeout with a error

Posted on 2010-09-05
4
704 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 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

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 …
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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