Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

CSS
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\v4.0.30319\Temporary ASP.NET Files\root\830e56f9\3fcc7360\App_Web_km5ksyv2.0.cs    Line: 0

Stack Trace:


[ViewStateException: Invalid viewstate.
    Client IP: 122.172.166.65
    Port: 18849
    Referer: http://apps-cobblestones.in/login/Logint.aspx?
    Path: /login/Logint.aspx
    User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:18.0) Gecko/20100101 Firefox/18.0
  





       Already i had hosted my application at that time it was running but after some times it's not work properly.Plz can any one help me  How can Solve this Problem?
Posted

That error raise when some risky charecter found in Http Request object. You can ignore that by skiping validation but it is not recommended. You can skip validation check by setting ValidatinonRequestProperty to false and EnableViewStateMac to false in page directives in markup file.example
HTML
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="WebApp2010.About" ValidateRequest="false" EnableViewStateMac="false" %>]]>
 
Share this answer
 
Kindly use
C#
<pages enableviewstatemac="false"></pages>
in web.config
Hope this helps
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900