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

x
?
Solved

How to resolve this server error which suddenly has started.

Posted on 2012-12-29
3
Medium Priority
?
425 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 750 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 750 total points
ID: 38729095
0
 

Author Closing Comment

by:searchsanjaysharma
ID: 38782072
ok
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

879 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