1
Answer

error comes on server in web applicaion

Photo of Pnkl

Pnkl

11y
1.3k
1
Hello Guys,

I uploaded my web application on server and its running well but some where it give below like error, so Give me solution if you have!

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\96dfbac2\6d2c70a7\App_Web_tdltrter.0.cs    Line: 0

Stack Trace:

[ViewStateException: Invalid viewstate. 
	Client IP: 123.201.23.219
	Port: 10784
	User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0
	ViewState: /wEPDwUJMjQyMDA4NTAwD2QWAmYPZBYCAgMPZBYCAgcPZBYCAgEPZBYGAgEPZBYCAgEPZBYCAgEPEGRkFgFmZAICD2QWAgIBD2QWAgIBDxBkZBYAZAIDD2QWAgIBD2QWAgIBDzwrAA0AZBgBBSNjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEdyaWRWaWV3MQ9nZJfEs+ErX8X48flsAyKsCTBwDbFC
	Referer: http://cmls.in/Admin/Default.aspx
	Path: /Admin/Default.aspx]

[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.admin_default_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\96dfbac2\6d2c70a7\App_Web_tdltrter.0.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              



Thanks .......

Answers (1)

0
Photo of Prakash Tripathi
NA 21k 2.5m 9y
You may want to explore MVC/ WEB API/ Client side frameworks (angular etc.). As these have become should have skills for .net web developers
0
Photo of viswa a
NA 264 10.9k 9y
ASP.NET is said to be desinging side of web and you have mvs go for it and keep updating thats will do for you.
0
Photo of Vignesh Mani
NA 13.4k 938.4k 9y
MVC and WCF are most important one.
0
Photo of Prasham Sabadra
NA 17.6k 1.2m 9y
Hi Rohan,
 
MVC is key technology, the use of both the technologies are for different requirements. But both are mostly require to use together.
 
Lets have hands on MVC first and then try WCF. 
0
Photo of Vignesh Mani
NA 13.4k 938.4k 9y
Asp.NET MVC 6 is new. You should learn MVC.
0
Photo of Upendra Pratap Shahi
NA 13.3k 861.7k 9y
In now days both are important for carrier growth.
 
and have knowledge of
 
Angular JS, node.js, KnockOut js
Entity Framework
WCF Services
WPF
WebAPI
 
0
Photo of Rohan Gupta
NA 442 44.8k 9y
ok Mr. Prasham Sabadra but wcf in best or mvc for me.
0
Photo of Prasham Sabadra
NA 17.6k 1.2m 9y
Hi Rohan,
 
Please have hands on asp.net mvc. MVC 5 is already there and asp.net vNext is in preview.
 
Lets have in depth understanding of MVC framework and then there are lots of supporting technologies like
 
Client side frameworks Angular JS, node.js, KnockOut js
Entity Framework
WCF Services
WPF
WebApis
 
Please let me if some more clarification required.
 
0
Photo of Rohan Gupta
NA 442 44.8k 9y
which type of new technologies 
0
Photo of Vignesh Mani
NA 13.4k 938.4k 9y
Hi first know well basic concept in-depth and learn new technologies as well as touch with technical people in different organizations.