Author: arf | Posted on: 9/23/2010 3:26:30 AM | Views : 574

I need to pass a userid as a guid number through a url quesrystring
 my starting GUID is in string format =  "23c6e6a5-e9fc-4fd0-aa15-e5db9b900388"
1) I encrypt it using tripledes
the resulting string value =  "nJYKpGwOeoOWepKPSDyNnO+xk+ZcfYZnyxvAnKTNCMV/ZJ7CfDKcmA=="
if I immeadiately decrypt it get the expected original value (so my tripledes provider is working)
2) I then urlencode the value for placing into the url which results in:
urlencoded = "nJYKpGwOeoOWepKPSDyNnO%2bxk%2bZcfYZnyxvAnKTNCMV%2fZJ7CfDKcmA%3d%3d"
3) when a read it back from the url using Request.QueryString (a function which automatically decodes the value)
I get the value: "nJYKpGwOeoOWepKPSDyNnO xk ZcfYZnyxvAnKTNCMV/ZJ7CfDKcmA=="
It appears the "+" characters where replaced with " "
This incorrect value caused the tripledes decryptio ...

Go to the complete details ...