Asp Net Error Unable To Validate Data
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack unable to validate data encryptordecryptdata Overflow the company Business Learn more about hiring developers or posting ads with us Stack
Unable To Validate Data Machinekey
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community system.web.configuration.machinekeysection.encryptordecryptdata(boolean fencrypt of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What does an “Unable to validate data” exception in System.Web.Configuration.MachineKeySection.GetDecodedData indicate up vote 5 down vote favorite asp net membership getpassword unable to validate data I've developed a website testing on localhost Cassini and it has always run fine, now when I deploy to my webserver I intermittently get the following error: Global.Application_Error Error: Exception occurred during request: http://....blah.aspx Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) HttpApplication.RaiseOnError => EventHandler.Invoke => Global.Application_Error This is being caught in my global.asax. I've searched around but can't find the
Exception Details: System.web.httpexception: Unable To Validate Data.
cause. This exception is being thrown in extremely simple and small webforms. The site is not hosted within a webfarm. 2 pages seem to cause this error intermittently and one of them stores a bool in the ViewState, but it is not modified apart from that. Has anyone come across this before? asp.net exception share|improve this question edited Dec 16 '15 at 17:12 Juan C. 2,47911427 asked Apr 29 '09 at 15:33 Ciaran O'Neill 1,31352334 add a comment| 5 Answers 5 active oldest votes up vote 10 down vote accepted http://dotnetcoderoom.wordpress.com/2008/11/07/unable-to-validate-data-aspnet-error/ Cause: The basic reason of this is the difference of key while encrypting and decrypting the viewstate data. Suppose an asp.net rendered a page with key1 and saved the page state in view state, meanwhile asp.net’s key is changed to key2, now when some server side event will occur on page the viewstate will get decrypted and this error will occur as the old view state is now not valid due to a different encryption key. It may occur when you open a page for along time and after that do some events on that. Solution Fix the key in your web.config file, so that only one key is used to encrypt and decrypt the viewstate data. For more information visit: http://www.experts-exchange.com
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and asp.net machinekey policies of this site About Us Learn more about Stack Overflow the this implementation is not part of the windows platform fips validated cryptographic algorithms. company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Machinekey Generator
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes http://stackoverflow.com/questions/802921/what-does-an-unable-to-validate-data-exception-in-system-web-configuration-mac a minute: Sign up “System.Web.HttpException: Unable to validate data” error in VS Development Server but not in IIS up vote 8 down vote favorite 2 I am using Visual Studio 2010 SP1 in Windows 7 64bit dev box. My asp.net works fine when using IIS on the box but when I switch to using Visual Studio Development Server, I get an http://stackoverflow.com/questions/9010096/system-web-httpexception-unable-to-validate-data-error-in-vs-development-serv exception "System.Web.HttpException: Unable to validate data" in this line (in Application_AuthenticateRequest event in global.asax.cs): FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value); Why does this fail when using the internal web server? asp.net visual-studio-2010 iis share|improve this question edited Jan 25 '12 at 21:00 Michiel van Oosterhout 17.4k1265109 asked Jan 25 '12 at 20:52 Tony_Henrich 11.6k42151272 add a comment| 3 Answers 3 active oldest votes up vote 13 down vote accepted Try deleting your cookies after you switch servers. Both servers have their own configuration and probably their own decryption key with which the forms authentication cookie is encrypted and decrypted. Thus, if you still have the cookie encrypted by IIS, then switch the project to use the built-in development server and hit the site, that server can't decrypt the cookie. You can prevent this issue if you put the decryption key in your web.config:
Latest Articles Latest Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog quick answersQ&A Ask a Question about this article Ask a Question View http://www.codeproject.com/Articles/43637/Weird-Error-Unable-to-Validate-Data-in-ASP-NET-web Unanswered Questions View All Questions... C# questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture http://www.dotnetfunda.com/community/show/71328/unable-to-validate-data-encryptordecryptdata-problem ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight unable to / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs unable to validate and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Articles » General Programming » Bugs & Workarounds » .NET issues Technical BlogView BlogBrowse CodeStatsRevisions (3)Alternatives Comments (12) Add your ownalternative version Tagged as All-TopicsASP.NET Stats 62K views7 bookmarked Posted 8 Nov 2009 Weird Error: Unable to Validate Data in ASP.NET website Abhishek Sur, 8 Nov 2009 CPOL 4.89 (7 votes) 1 2 3 4 5 4.89/5 - 7 votesμ 4.89, σa 0.90 [?] Rate this: Please Sign up or sign in to vote. A weird error that comes when a page is opened for a long time and then posted back Have you ever come across a situation where your website which was working for the last couple of months gives a weird error "Unable to Validate Data". Yesterday, while working I found that my website which is already published in IIS throws this error. Initially I thought the error might be with my code, but I found that everything is good with the code. So I looked forward to internet and found that this error comes when the viewstate of a page cannot be decrypted when the response is received from the client. When I looked at where the error was occurring (Target Site) I fou
ASP.NET MVC | Online Interviews | Top Performers | DNF MVP | Top Posts | Winners | Subscribe | Bookmarks | Catalogs Welcome Guest ! Register Login Home > Community > Community Categories > Articles Blogs Forums News and Events Post An Article An Interview Question A Forum Post A Career Advice Question A Video A Code A Job A Product Catalog An Interview Experience A Bookmark A News Unable to validate data, EncryptOrDecryptData problem Posted on: 1/23/2014 11:02:56 PM | Views : 3578 Search Resources | Community Home I am getting hundreds of these errrors on the production server (IIS7.5, .net 4.5 web app): Exception type: System.Web.HttpException Exception message: Unable to validate data. Request URL: http://domainname/WebResource.axd?d=vIkcOYaxqSd6eMCUlxDkdQVxjxcaRV8fWPLFaNn8W4w1&t=633802992069218315&AspxAutoDetectCookieSupport=1 Request path: /WebResource.axd Stack trace: at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo, Boolean useLegacyMode, IVType ivType, Boolean signData) They began after I migrated the site from .net 3.5 to .net 4, then4.5. This is the machineKey element in web.config: