Server Error in '/' Application.

Invalid length for a Base-64 char array or 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 length for a Base-64 char array or string.

Source Error:


Line 39:             ss = HttpContext.Current.Session
Line 40:             sesID = ss.SessionID
Line 41:             Dim Dsubcat As String = RichClass.Security.DecryptData(Request.QueryString("SubCat"))
Line 42:             Dim DMainID As String = RichClass.Security.DecryptData(Request.QueryString("MainId"))
Line 43:             'Dim Dsubcat As String = Request.QueryString("SubCat").ToString()

Source File: D:\html\users\ratna_user\ratnasagar.com\wwwroot\bookdetail\bookdetail.aspx.vb    Line: 41

Stack Trace:


[FormatException: Invalid length for a Base-64 char array or string.]
   System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength) +802
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +128
   System.Convert.FromBase64String(String s) +49
   RichClass.Security.DecryptData(String CleanString) +59
   ratna.bookdetail.Page_Load(Object sender, EventArgs e) in D:\html\users\ratna_user\ratnasagar.com\wwwroot\bookdetail\bookdetail.aspx.vb:41
   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.3770.0