Server Error in '/' Application.

Invalid character in a Base-64 string.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Invalid character in a Base-64 string.

Source Error:


Line 2083:        //get the byte code of the string
Line 2084:
Line 2085:        byte[] toEncryptArray = Convert.FromBase64String(cipherString.Trim().Replace(" ", "+"));
Line 2086:
Line 2087:        string key = ")(*&";

Source File: g:\pleskvhosts\diligencewebtechnologies.co.in\kaushalenterprises.com\App_Code\DAL\AppLib.cs    Line: 2085

Stack Trace:


[FormatException: Invalid character in a Base-64 string.]
   System.Convert.FromBase64String(String s) +0
   AppLib.Decrypt(String cipherString) in g:\pleskvhosts\diligencewebtechnologies.co.in\kaushalenterprises.com\App_Code\DAL\AppLib.cs:2085
   products_default.bindproduct() in g:\pleskvhosts\diligencewebtechnologies.co.in\kaushalenterprises.com\products\default.aspx.cs:24
   products_default.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\diligencewebtechnologies.co.in\kaushalenterprises.com\products\default.aspx.cs:16
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062