Server Error in '/' Application.

The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

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: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

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: c:\inetpub\vhosts\148-66-130-185.secureserver.net\mlcd.in\App_Code\DAL\AppLib.cs    Line: 2085

Stack Trace:


[FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. ]
   System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) +12723144
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +130
   System.Convert.FromBase64String(String s) +42
   AppLib.Decrypt(String cipherString) in c:\inetpub\vhosts\148-66-130-185.secureserver.net\mlcd.in\App_Code\DAL\AppLib.cs:2085
   notes_details.BindNotes() in c:\inetpub\vhosts\148-66-130-185.secureserver.net\mlcd.in\notes\details.aspx.cs:60
   notes_details.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\148-66-130-185.secureserver.net\mlcd.in\notes\details.aspx.cs:12
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0