Every now and again I am getting an error when trying to render the Formshield control. I used one of the examples to make sure I was putting my code in the same way, but this crops up at random times. Our app is all in .NET 1.1 - am using version 1.1.2.31198 of the control. I'm hoping you have heard from others about this. We are also using StringCompareValidator as well.
The error Description :
System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Security.Cryptography.CryptographicException: Length of the data to decrypt is invalid.
at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at dotNetFreak.WebControls.FormShield.Decrypt(String encryptedString)
at dotNetFreak.WebControls.FormShield.ParseQueryString()
at dotNetFreak.WebControls.FormShield.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Server Variables :
APPL_MD_PATH : /LM/W3SVC/1961825565/Root APPL_PHYSICAL_PATH : c:\inetpub\sites\com\registerlocal\profiles\
AUTH_TYPE :
AUTH_USER :
AUTH_PASSWORD :
LOGON_USER :
REMOTE_USER :
CERT_FLAGS :
CERT_ISSUER :
CERT_KEYSIZE :
CERT_SECRETKEYSIZE :
CERT_SERIALNUMBER :
CERT_SERVER_ISSUER :
CERT_SERVER_SUBJECT :
CERT_SUBJECT :
CONTENT_LENGTH : 0
CONTENT_TYPE :
GATEWAY_INTERFACE : CGI/1.1
HTTPS : off
HTTPS_KEYSIZE :
HTTPS_SECRETKEYSIZE :
HTTPS_SERVER_ISSUER :
HTTPS_SERVER_SUBJECT :
INSTANCE_ID : 1961825565
INSTANCE_META_PATH : /LM/W3SVC/1961825565 LOCAL_ADDR : 10.101.1.19 PATH_INFO : /domains/dexonline/error.aspx PATH_TRANSLATED : c:\inetpub\sites\com\registerlocal\profiles\domains\dexonline\error.aspx
QUERY_STRING : path=Building-Contractors-SWFLA-Inc&domain=dexonline&nocrawl=1&ID=964&AltDom=1&aspxerrorpath=/domains/dexonline/sendtofriend.aspx
REMOTE_ADDR : 69.84.207.37
REMOTE_HOST : 69.84.207.37
REMOTE_PORT : 11847
REQUEST_METHOD : GET
SCRIPT_NAME : /domains/dexonline/error.aspx SERVER_NAME : www.buildingcontractorofswfla.com SERVER_PORT : 80 SERVER_PORT_SECURE : 0 SERVER_PROTOCOL : HTTP/1.1 SERVER_SOFTWARE : Microsoft-IIS/6.0 URL : /domains/dexonline/error.aspx HTTP_CONNECTION : TE HTTP_HOST : www.buildingcontractorofswfla.com HTTP_RANGE : bytes=0-249999 HTTP_TE : deflate,gzip;q=0.3 HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215) HTTP_X_REWRITE_URL : /error.html?aspxerrorpath=/domains/dexonline/sendtofriend.aspx
The ID of this error is : 2040418