Solved

How to resolve this server error which suddenly has started.

Posted on 2012-12-29
3
409 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
application restarter  - for an exe that hangs 9 28
.NET 2008 VB and C# 6 28
Save ms data to server side. 19 46
No Data for DropDown List 2 26
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
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…

823 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