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 22:     {
Line 23:         string decodedString = null;
Line 24:         decodedString = System.Text.ASCIIEncoding.ASCII.GetString(Convert.FromBase64String(StrDecode));
Line 25:         return decodedString;
Line 26:     }

Source File: c:\inetpub\vhosts\ogpeafrica.com\httpdocs\DirectoryList.aspx.cs    Line: 24

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) +364
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +128
   System.Convert.FromBase64String(String s) +49
   DirectoryList.b64decode(String StrDecode) in c:\inetpub\vhosts\ogpeafrica.com\httpdocs\DirectoryList.aspx.cs:24
   DirectoryList.showcomplist() in c:\inetpub\vhosts\ogpeafrica.com\httpdocs\DirectoryList.aspx.cs:55
   DirectoryList.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\ogpeafrica.com\httpdocs\DirectoryList.aspx.cs:47
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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