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 339:        If System.Web.HttpRuntime.Cache("marks" & m) Is Nothing Then
Line 340:            Dim EncryptionKey As String = "VINODKOTIYA2016"
Line 341:            Dim cipherBytes As Byte() = Convert.FromBase64String(cipherText)
Line 342:            Using encryptor As Aes = Aes.Create()
Line 343:                Dim pdb As New Rfc2898DeriveBytes(EncryptionKey, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D,

Source File: h:\root\home\bifpcl2-001\www\bifpcl\App_Code\dbOp.vb    Line: 341

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) +12849950
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +133
   System.Convert.FromBase64String(String s) +43
   dbOp.Decrypt(String cipherText) in h:\root\home\bifpcl2-001\www\bifpcl\App_Code\dbOp.vb:341
   _docStoreX._Default_Load(Object sender, EventArgs e) in h:\root\home\bifpcl2-001\www\bifpcl\docStoreX.aspx.vb:35
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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