473,598 Members | 3,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Length of the data to decrypt is invalid

am getting the following error when a sub domain is receiving a shared cookie:

I have this in both web.config of each application. The 1.1 application
does not have the decryption= value because you cannot have that for 1.1 or
asp.net will error out. The source application is coded in .NET 2.0 but the
target application that's sharing the source app's cookie is a .NET 1.1 app.

<machineKey
validationKey=" 157D2DCDD329944 9RD4C15DGFC06C9 D7742CDEB5CC6B2 F3146A954TR4C98 182FF0HF97E63FF E44YU7K37412DAE AEA41DE12DA90FB 21320D6467E5282 A7ADDC"
decryptionKey=" 7JU1C60AREEB883 1524C03B273F696 3BCA8GTB3CCECBA 7U4"
validation="SHA 1" decryption="3DE S" />

Unexpected Problem Occurred!
This error has been logged. If this problem persists please contact the web
master.
More Information...
Detailed error information follows:

Date and Time: 8/18/2006 10:13:35 PM
Machine Name: srV_sgg
Process User: srV_sgg\ASPNET
Remote User:
Remote Address: 127.0.0.1
Remote Host: 127.0.0.1
URL: http://www.test.com/Default.aspx

NET Runtime version: 2.0.50727.42
Application Domain: /LM/W3SVC/2/Root-1-128004307979440 000
Assembly Codebase:
C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
Assembly Full Name: mscorlib, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9
Assembly Version: 2.0.0.0
Assembly Build Date: 9/23/2005 7:28:56 AM

Exception Type: System.Security .Cryptography.C ryptographicExc eption
Exception Message: Length of the data to decrypt is invalid.
Exception Source: mscorlib
Exception Target Site: TransformFinalB lock

---- Stack Trace ----

System.Security .Cryptography.R ijndaelManagedT ransform.Transf ormFinalBlock(i nputBuffer As Byte[], inputOffset As Int32, inputCount As Int32)
(unknown file): N 1493330
System.Security .Cryptography.C ryptoStream.Flu shFinalBlock()
(unknown file): N 00030
System.Web.Conf iguration.Machi neKeySection.En cryptOrDecryptD ata(fEncrypt
As Boolean, buf As Byte[], modifier As Byte[], start As Int32, length As
Int32, useValidationSy mAlgo As Boolean)
(unknown file): N 00154
System.Web.Secu rity.FormsAuthe ntication.Decry pt(encryptedTic ket As String)
(unknown file): N 00247
InstantASP.Comm on.Authenticati on.Authenticati on.Ticket()
(unknown file): N 00025
InstantASP.Inst antForum.UI.Con trols.Default.I nitialize(ctlSk in As Control)
(unknown file): N 00019
InstantASP.Comm on.UI.Base.Skin .CreateChildCon trols()
(unknown file): N 00030
InstantASP.Inst antForum.UI.Ski nning.Base.Crea teChildControls ()
(unknown file): N 00037
System.Web.UI.C ontrol.EnsureCh ildControls()
(unknown file): N 00087
System.Web.UI.C ontrol.PreRende rRecursiveInter nal()
(unknown file): N 00041
System.Web.UI.C ontrol.PreRende rRecursiveInter nal()
(unknown file): N 00161
System.Web.UI.C ontrol.PreRende rRecursiveInter nal()
(unknown file): N 00161
System.Web.UI.C ontrol.PreRende rRecursiveInter nal()
(unknown file): N 00161
System.Web.UI.C ontrol.PreRende rRecursiveInter nal()
(unknown file): N 00161
System.Web.UI.P age.ProcessRequ estMain(include StagesBeforeAsy ncPoint As
Boolean, includeStagesAf terAsyncPoint As Boolean)
The 1.1 application that is doing am encrypt and decrypt on the cookie using
the System.Web.Secu rity.FormsAuthe ntication.Encry pt and
System.Web.Secu rity.FormsAuthe ntication.Decry pt methods
--
dba123
Aug 21 '06 #1
0 3048

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
29223
by: Jimski | last post by:
Hello all, I am having a problem where I get an error message when I call FlushFinalBlock when decrypting my encrypted text. I am using the Rijndael algorithm. The error message is "Length of the data to decrypt is invalid" and occurs on the csDecrypt.FlushFinalBlock.
1
5309
by: gane kol | last post by:
Hi I am using DES algorithm. I am getting an error message in a few cases of the querystring Error Message : Length of the data to decrypt is invalid. Error Method : System.String Decrypting(System.String) Error Line: strDecrpt = sr.ReadToEnd(); QueryString Data:
7
17868
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm able to encrypt and then decrypt data okay as in the following code: // encrypt the data // Encryptor enc = new Encryptor(EncryptionAlgorithm.TripleDes); byte key = Encoding.ASCII.GetBytes("0123456789012345");
0
3357
by: Hannibal111111 | last post by:
I found this code on a site for doing string encryption/decryption. The string will encrypt fine, but I get this error when I try to decrypt. Any idea why? I posted the code below. The error actually points to this line of code in byte decrypt function: cs.FlushFinalBlock(); public static byte encrypt(byte clearData, byte Key, byte IV)
1
8014
by: Sathyaish | last post by:
I have the following scenario: Algorithm: 3DES Cipher Mode: CBC Key Size: 128-bit Block Size: 64 bit IV: 0x0000000000000000 (an eight byte array of zeros) The results I get using .NET with the following routine are:
4
6215
by: floppyzedolfin | last post by:
Hello! I'm actually encoding an encryption / decryption program. The encryption programes takes a file path in parameter, and encrypts the contents of the file and stores that into another file. I'm using AES for it is quick, and RSA to encrypt AES, to transmit AES keys (it'll run on two separate computers). Please notice that - this is my first C# code :)
4
5689
by: Fritjolf | last post by:
Hi. I've got a strange problem... I've made a simple program to test encryption/decryption. I use Rijndael encryption and here are the most important properties. RijndaelManaged cipher = new RijndaelManaged(); cipher.KeySize = 256; cipher.BlockSize = 256;
3
4376
by: Sin Jeong-hun | last post by:
It seems like the Protect() uses the Windows accout information to encrypt data. If I know the user name and the password, can I decrypt it on another PC? If it is not, how about the exported key? On Windows Vista, if file encryption is used, Windows suggests to back up the key. If I import the key on another PC, then can I decrypt a data protected by the Protect() method? Or it is impossible by any means?
1
2495
by: SM | last post by:
Hi, I need your help, the following code is not working, ret = sr.ReadToEnd() throws the message error : Length of the data to decrypt is invalid. Any idea ? thank you public string Decrypting(string Source, string Key) { string ret = ""; try
13
3565
by: Tom Andrecht | last post by:
I'm trying to get some encryption/decryption routines going to take care of my data, and while the encryption is working great, I keep running into the message "Padding is invalid and cannot be removed" on the decryption piece. From everything I can see, I am doing things correctly here My code is as follows: private const string PassStr = "MyPrivateKey"; private static readonly byte PassSalt = new byte { Byte Byte Byte Byte Byte};...
0
7987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8392
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8264
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6718
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5850
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5438
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1504
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1250
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.