I was having a problem in my checkout page, the problem that i had was i’ve got this memberID from the checkout page and it’s being passed to another page via query string. This problem doesn’t happen everytime and it happens rarely, this is what i hate the most!!. After spending a couple of hours, i found the problem is in the query string it self.
when you pass something like this in query string
“c+ckDQiiilyW4r7moRA8oQ==”
and it will be automatically converted becoming
“c ckDQiiilyW4r7moRA8oQ==”
and when you try to decrypt it, it will throw the exception of “not valid Base64 character”
“+” when you pass it to url it will be automatically converted to ” “(blank space)
The work around of this problem is
on the target page, you can do some string replace of ” “(blank space) with “+” , and voila it works!!!!
Dim strQuery As String = Request.QueryString("OrderID") strQuery = strQuery.Replace(" ", "+")
Leave a Reply