Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to resolve this server error which suddenly has started.

Posted on 2012-12-29
3
Medium Priority
?
423 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

688 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