Solved

How to resolve this server error which suddenly has started.

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

20 Experts available now in Live!

Get 1:1 Help Now