Dear All,
I am facing problem when i visit my site for posting data or just browing after some time of open and i also set session time out <sessionstate timeout="540">
but still facing problem website give runtime error.
and after that i have set custom error off
then new error raise
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.
See http:
See http:
Source Error:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\fd0b3228\1d95266\App_Web_j3v4lbmw.4.cs Line: 0
Stack Trace:
[ViewStateException: Invalid viewstate.
Client IP: 103.206.131.163
Port: 55571
Referer: http:
Path: /ADMIN/ProductData_Posting.aspx
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
ViewState: /wEPDwUKLTkzNjg2NzU2MA9kFgJmD2QWAgIFDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFgICBw9kFgICAQ8PZBYCHglvbmtleWRvd24FkgJpZihldmVudC53aGljaCB8fCBldmVudC5rZXlDb2RlKXtpZiAoKGV2ZW50LndoaWNoID09IDEzKSB8fCAoZXZlbnQua2V5Q29kZSA9PSAxMykpIHtpZihkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnQ29udGVudFBsYWNlSG9sZGVyMV90eHRUcmFuSUQnKS52YWx1ZT09Jycpe3JldHVybiBmYWxzZTt9ZWxzZXtkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnQ29udGVudFBsYWNlSG9sZGVyMV9idG5WaWV3JykuY2xpY2soKTtyZXR1cm4gZmFsc2U7fX19IGVsc2Uge3JldHVybiB0cnVlfTsgZGTTYjB99ocAv1Cth+GNb52+pD3vkki5i7XYLqikLIlWRA==]
[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.
See http:
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +425
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Deserialize(String serializedState, Purpose purpose) +13
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +40
System.Web.UI.HiddenFieldPageStatePersister.Load() +247
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +251
System.Web.UI.Page.LoadAllState() +41
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6605
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +279
System.Web.UI.Page.ProcessRequest() +72
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +22
System.Web.UI.Page.ProcessRequest(HttpContext context) +58
ASP.admin_productdata_posting_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\fd0b3228\1d95266\App_Web_j3v4lbmw.4.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
--------------------------------------------------------------------------------
after that i am search for above error then google suggest set mechinekey into my webconfig file
when set machine key then my website response internal error 500
kindly suggest me for my problem
Thanks in Advance
What I have tried:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configsections>
<sectiongroup name="devExpress">
<section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v10.1, Version=10.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirepermission="false" />
<section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v10.1, Version=10.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirepermission="false" />
<section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v10.1, Version=10.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirepermission="false" />
</sectiongroup>
</configsections>
<connectionstrings>
<add name="GREEDY_ConnString" connectionstring="Data Source=103.23521536;Initial Catalog=12;User ID=12fhfg;Password=456456@12345;" providername="System.Data.SqlClient" />
</connectionstrings>
<system.net>
<mailsettings>
<smtp deliverymethod="Network">
<network host="testn" port="215" username="abc" password="xyzi" />
</smtp>
</mailsettings>
</system.net>
<system.web>
<identity impersonate="false" username="adminstrator" password="admin" />
<authentication mode="Windows" />
<customerrors mode="Off">
<error statuscode="403" redirect="NoAccess.htm" />
<error statuscode="404" redirect="FileNotFound.htm" />
</customerrors>
<authorization>
<allow users="*" />
</authorization>
<pages controlrenderingcompatibilityversion="4.0" clientidmode="AutoID" enableviewstatemac="true">
<controls>
<add tagprefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<compilation debug="true" targetframework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<httphandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httphandlers>
<httpruntime executiontimeout="90" maxrequestlength="65536" usefullyqualifiedredirecturl="false" minfreethreads="8" minlocalrequestfreethreads="4" apprequestqueuelimit="100" enableversionheader="true" />
<sessionstate timeout="540" />
</system.web>
<system.webserver>
<validation validateintegratedmodeconfiguration="false" />
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" precondition="integratedMode" />
<add name="ChartImageHandler" precondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
<directorybrowse enabled="false" />
<defaultdocument>
<files>
<clear />
<add value="index.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
<add value="index.php" />
</files>
</defaultdocument>
</system.webserver>
<location allowoverride="true" inheritinchildapplications="true">
<appsettings>
<add key="GREEDY_ConnString" value="Data Source=103.525.105152;Initial Catalog=fghfh;User ID=fghfgh;Password=fghffg@12345;Connect Timeout=200; pooling='true'; Max Pool Size=200" />
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="biomatrictimesheet" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
<add key="SmtpSSL" value="true" />
<add key="Timeout" value="1000000" />
<add key="Log4netConfigFile" value="logging.config" />
<add key="ChartImageHandler" value="storage=memory;timeout=36000;deleteAfterServicing=false;privateImages=false;" />
<add key="AttachmentPath" value="C:/PaySlip_Attachment" />
<add key="aspnet:MaxHttpCollectionKeys" value="3000000" />
</appsettings>
</location>
<runtime>
<assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyidentity name="CrystalDecisions.Shared" publickeytoken="692fbea5521e1304" />
<bindingredirect oldversion="10.2.3600.0" newversion="10.5.3700.0" />
</dependentassembly>
<dependentassembly>
<assemblyidentity name="CrystalDecisions.Shared" publickeytoken="692fbea5521e1304" />
<bindingredirect oldversion="10.2.3600.0" newversion="10.5.3700.0" />
</dependentassembly>
</assemblybinding>
</runtime>
<devexpress>
<compression enablehtmlcompression="false" enablecallbackcompression="true" enableresourcecompression="true" enableresourcemerging="false" />
<themes enablethemesassembly="true" />
<errors callbackerrorredirecturl="" />
</devexpress>
</configuration>