Bad Data Error - cryptoapitransform

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Bad Data Error - cryptoapitransform

    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.CryptographicExceptio n: 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._D ecryptData(IntPtr hKey,
    Byte[] rgb, Int32 ib, Int32 cb, Boolean fDone) +0

    System.Security.Cryptography.CryptoAPITransform.Tr ansformFinalBlock(Byte[]
    inputBuffer, Int32 inputOffset, Int32 inputCount) +805
    System.Security.Cryptography.CryptoStream.FlushFin alBlock() +40
    System.Web.Configuration.MachineKey.EncryptOrDecry ptData(Boolean
    fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length) +139
    System.Web.Security.FormsAuthentication.Decrypt(St ring encryptedTicket)
    +114
    Solomon.Global.Application_AuthenticateRequest(Obj ect sender, EventArgs
    e) +632

    System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute() +60
    System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
    completedSynchronously) +87



    What do I need to do to prevent this error
    David Turner Guest

  2. Similar Questions and Discussions

    1. Data binding error
      I am getting the following publising error: Scene 1, Binding between <unknown>.. and <unknown>.dataProvider.: The endpoint of the binding does not...
    2. Data Integration error
      When I install the rdbms.asp2 sample data on IIS. If i run database from from browser i.e.http://localhost/rdbms-asp2.html, if i try to add new...
    3. Internal Data Error
      Bump...same problem!! How do you delete log files?
    4. CDONTS error - too much data?
      I have been using the CDONTS component on Windows 2000 to send emails for a long time now (code below). However, over time, the report that I am...
    5. Problem reading layer data error? Composite data instead? WTF
      There are some situations where as a PS 6 document is seen as having problems in a PS 7 and PS8 version of Photoshop. There is also a chance, because...
  3. #2

    Default RE: Bad Data Error - cryptoapitransform

    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.CryptographicExceptio n: 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._D ecryptData(IntPtr hKey,
    > Byte[] rgb, Int32 ib, Int32 cb, Boolean fDone) +0
    >
    > System.Security.Cryptography.CryptoAPITransform.Tr ansformFinalBlock(Byte[]
    > inputBuffer, Int32 inputOffset, Int32 inputCount) +805
    > System.Security.Cryptography.CryptoStream.FlushFin alBlock() +40
    > System.Web.Configuration.MachineKey.EncryptOrDecry ptData(Boolean
    > fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length) +139
    > System.Web.Security.FormsAuthentication.Decrypt(St ring encryptedTicket)
    > +114
    > Solomon.Global.Application_AuthenticateRequest(Obj ect sender, EventArgs
    > e) +632
    >
    > System.Web.SyncEventExecutionStep.System.Web.HttpA pplication+IExecutionStep.Execute() +60
    > System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
    > completedSynchronously) +87
    >
    >
    >
    > What do I need to do to prevent this error
    MichaelDH Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139