I have a simple .net application using the .NET 2.0 runtime in IIS 7.5, where I changed the machine key in the web.config file to use the following:
<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="SHA1"/>
This works fine locally, but when I publish on the server, I get "HttpException (0x80004005):" Unable to validate data "every time I browse the site. I tried to set debug =" false "compilation. Setting the validation method to 3DES fixes this problem, but we have a requirement to work with SHA1. Is there some kind of configuration that I'm missing here? see stack trace below.
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData (Boolean fEncrypt, Byte [] buf, Byte [] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo, Boolean signData) +1008
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData (Boolean fEncrypt, Byte [] buf, Byte [] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo) +91
System.Web.UI.Page.EncryptStringWithIV (String s, IVType ivType) +83
System.Web.UI.Page.EncryptString (String s) +30
System.Web.Handlers.RuntimeScriptResourceHandler.GetScriptResourceUrlImpl (List`1 assemblyResourceLists, Boolean zip, Boolean notifyScriptLoaded) +1497
System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl (List`1 assemblyResourceLists, Boolean zip, Boolean notifyScriptLoaded) +1148
System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl (Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +152
System.Web.Handlers.ScriptResourceHandler.GetScriptResourceUrl (Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +37
System.Web.UI.ScriptManager.GetScriptResourceUrl (String resourceName, Assembly assembly) +105
System.Web.UI.ScriptRegistrationManager.RegisterClientScriptResource (Control control, Type type, String resourceName) +113
System.Web.UI.ScriptManager.System.Web.UI.IScriptManager.RegisterClientScriptResource (Control control, Type type, String resourceName) +14
System.Web.UI.ClientScriptManager.RegisterClientScriptResource (Control control, Type type, String resourceName) +53
System.Web.UI.WebControls.Menu.OnPreRender (EventArgs e, Boolean registerScript) +113
System.Web.UI.WebControls.Menu.OnPreRender (EventArgs e) +25
System.Web.UI.Control.PreRenderRecursiveInternal () +80
System.Web.UI.Control.PreRenderRecursiveInternal () +171
System.Web.UI.Control.PreRenderRecursiveInternal () +171
System.Web.UI.Control.PreRenderRecursiveInternal () +171
System.Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842