RE: Bad Data Error - cryptoapitransform

From: MichaelDH (MichaelDH_at_discussions.microsoft.com)
Date: 11/04/04


Date: Thu, 4 Nov 2004 09:39:02 -0800

Hello David,

sorry I haven't any glue too.
But I've the same issue and may be you solved it already and help me.

Cheers, Michael

"David Turner" wrote:

> I have the same ASP.NET application that is installed in two locations on the
> same web server, each with it's own application in IIS. One instance is our
> Intranet and uses Windows authentication, the other is our external website
> and uses Forms authentication.
>
> User's can log into each instance just fine, and as long as they only access
> one of the applications everything works fine.
>
> However, if a user logs into one application and then tries to access the
> other without first closing their browser and restarting, they get the
> following error...
>
> Bad Data.
>
> 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.Security.Cryptography.CryptographicException: Bad
> Data.
>
> Source Error:
>
> An unhandled exception was generated during the execution of the current web
> request. Information regarding the origin and location of the exception can
> be identified using the exception stack trace below.
>
> Stack Trace:
>
> [CryptographicException: Bad Data.
> ]
> System.Security.Cryptography.CryptoAPITransform._DecryptData(IntPtr hKey,
> Byte[] rgb, Int32 ib, Int32 cb, Boolean fDone) +0
>
> System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[]
> inputBuffer, Int32 inputOffset, Int32 inputCount) +805
> System.Security.Cryptography.CryptoStream.FlushFinalBlock() +40
> System.Web.Configuration.MachineKey.EncryptOrDecryptData(Boolean
> fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length) +139
> System.Web.Security.FormsAuthentication.Decrypt(String encryptedTicket)
> +114
> Solomon.Global.Application_AuthenticateRequest(Object sender, EventArgs
> e) +632
>
> System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +87
>
>
>
> What do I need to do to prevent this error



Relevant Pages

  • Re: Server Error in / Application
    ... > the current web request. ... > An unhandled exception was generated during the execution of the ... > the exception can be identified using the exception stack trace below. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: "Method Write . . . does not have an implementation"
    ... > the current web request. ... > An unhandled exception was generated during the execution of the ... > the exception can be identified using the exception stack trace below. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Asp.net MySQL connection problem
    ... the current web request. ... Please review the stack trace for more ... An unhandled exception was generated during the execution of the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: converting String to uniqueidentifier
    ... An unhandled exception occurred during the execution of the current web request. ... Information regarding the origin and location of the exception can be identified using the exception stack trace below. ...
    (microsoft.public.dotnet.languages.csharp)
  • Filling a dropdownlistbox with two items part 2
    ... An unhandled exception occurred during the execution of the current web request. ... Information regarding the origin and location of the exception can be identified using the exception stack trace below. ...
    (microsoft.public.dotnet.languages.csharp)