Error while decrypting the encrypted querystring due to the space in the querystring
One of my blog reader posted the below question, Well , I was expecting this question as I had encountered the same issue and resolved. Please find the question along with the resolution as below.
Hi
I have tried the above code, and found a problem -
The encrypted value of 4 is S91QD+K0/u8=. When I pass this value to another page and read it by Request.QueryString it read as S91QD K0/u8= (without + sign). For that in the time of decryption it is showing an error.
How to solve the problem ?
The solution to the above problem is as follows.
if (queryString.Contains(” “))
{
queryString = queryString.Replace(’ ‘, ‘+’);
}
decryptedQueryStrings = encdecQS.Decrypt(queryString, “YOUR SECRET KEY”);
HOPE THIS HELPS
Posted: August 13th, 2008 under BizTalk.