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 113:            DataTable dt = new DataTable();
Line 114:            //dt = Jsql.Last_Thirty_Days_SchemeWise_Activity(Convert.ToInt32((Request.QueryString["SID"]).ToString()), 0);
Line 115:           dt = Jsql.Last_Thirty_Days_SchemeWise_Activity(Convert.ToInt32(NicMp.Common.Cryptions.DecryptString(Request.QueryString["SID"]).ToString()), 0);
Line 116:            JSON_Helper.ThreeValues Json = new JSON_Helper.ThreeValues();
Line 117:            List<JSON_Helper.ThreeValues> ObjJsonResult = new List<JSON_Helper.ThreeValues>();

Source File: d:\Application Code\Production\DBoard\StateSchemeDashboard.aspx.cs    Line: 115

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
   NicMp.Common.Cryptions.DecryptString(String EncryptedString) +59
   MShikshaMitra_SchemeDashboard.InitializeCharts() in d:\Application Code\Production\DBoard\StateSchemeDashboard.aspx.cs:115
   MShikshaMitra_SchemeDashboard.Page_Load(Object sender, EventArgs e) in d:\Application Code\Production\DBoard\StateSchemeDashboard.aspx.cs:24
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   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.3930.0