Solved

How to resolve this server error which suddenly has started.

Posted on 2012-12-29
3
403 Views
Last Modified: 2013-01-16
I have only ftp access to the server . The Framework is 2.0.
The web.config data is as follows:
<?xml version="1.0"?>
<configuration>
        <connectionStrings>
            <add name="sSqlConn" connectionString="Data Source=localhost;Initial Catalog=INC123_new1;uid=INC123_gfatm;pwd=admin12!@" providerName="System.Data.SqlClient"/>
      </connectionStrings>
      <system.web>
    <customErrors mode="Off" ></customErrors>
                <compilation debug="true"/></system.web></configuration>


The error is:

Server Error in '/' 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\v2.0.50727\Temporary ASP.NET Files\root\23987745\f8e58afd\App_Web_rs7xidvs.12.cs    Line: 0

Stack Trace:

[ViewStateException: Invalid viewstate.
      Client IP: 124.253.23.59
      Port: 49924
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.503.0 Safari/534.6
      ViewState: /wEPDwUKLTc2OTgwODQxMw9kFgICAw9kFhYCAw8PFgIeBFRleHQFBU5PUlRIZGQCBw8PFgIfAAUSQ09OLCBDTUMsIExVREhJQU5BZGQCCQ8PFgIfAAUSVHJhaW5pbmcgb2YgTnVyc2VzZGQCDQ8PFgIfAAUDVE9OZGQCDw8QDxYIHg1EYXRhVGV4dEZpZWxkBQVzZGF0ZR4ORGF0YVZhbHVlRmllbGQFBXNkYXRlHgtfIURhdGFCb3VuZGceB0VuYWJsZWRoZBAVHRQtLVNlbGVjdCBTdGFydGRhdGUtLQswMiBNYXkgMjAxMQswMyBEZWMgMjAxMgswNSBTZXAgMjAxMQswNiBBdWcgMjAxMgswNiBKdW4gMjAxMQswNyBNYXIgMjAxMQswOCBBdWcgMjAxMQswOSBKYW4gMjAxMgswOSBNYXkgMjAxMQsxMCBPY3QgMjAxMQsxMSBKdW4gMjAxMgsxMiBTZXAgMjAxMQsxMyBGZWIgMjAxMgsxNCBNYXkgMjAxMgsxNCBOb3YgMjAxMQsxNiBBcHIgMjAxMgsxNiBKYW4gMjAxMgsxNiBKdWwgMjAxMgsxNyBPY3QgMjAxMQsxOCBKdWwgMjAxMQsxOSBOb3YgMjAxMgsyMCBGZWIgMjAxMgsyMSBGZWIgMjAxMQsyMSBNYXkgMjAxMgsyMyBKdWwgMjAxMgsyOCBGZWIgMjAxMQsyOCBOb3YgMjAxMQsyOSBPY3QgMjAxMhUdATALMDIgTWF5IDIwMTELMDMgRGVjIDIwMTILMDUgU2VwIDIwMTELMDYgQXVnIDIwMTILMDYgSnVuIDIwMTELMDcg...]

[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) +237
   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.gfatm_testcharts_ptfp2_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\23987745\f8e58afd\App_Web_rs7xidvs.12.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:2.0.50727.5466; ASP.NET Version:2.0.50727.5456
0
Comment
Question by:searchsanjaysharma
3 Comments
 
LVL 9

Assisted Solution

by:sognoct
sognoct earned 250 total points
ID: 38729025
his error is only generated if you navigate quickly through the web application. that means, if you press an <asp:Button> before the whole page is loaded/rendered, then you get this posted error. if you wait until the whole page has finished rendering, then the postback generates no errors.
source :
http://forums.asp.net/t/955145.aspx
 
You can fix this by setting the EnableViewStateMAC property to false. Refer to more information about EnableViewStateMAC in the link given below:
 
http://msdn.microsoft.com/en-us/library/system.web.ui.page.enableviewstatemac.aspx
0
 
LVL 16

Accepted Solution

by:
Imran Javed Zia earned 250 total points
ID: 38729095
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 38782072
ok
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
This code tracks birthdays 3 57
coded character set iptc field within a jpeg 1 67
Icons and Colors for Terms 3 24
About delegates in c sharp 3 23
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now