Invalid character in a Base-64 string.

G

Guest

in the aspx application am calling a component (made by me) that convert a
string to base64 as :
//In Component Side (Different solution than application)
return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(sTo));
//In application side i did this
string sTo =
System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(Request.QueryString["To"]));

but exception occured with following message

<Msg>Invalid character in a Base-64 string.</Msg>
<Trace>at System.Convert.FromBase64String(String s) at
BriefCase.Mail_en.Page_Load(Object sender, EventArgs e) at
System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain()</Trace>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top