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 64: Public Function Decrypt(cipherText As String, ByVal EncryptionKey As String) As String
Line 65:     cipherText = cipherText.Replace(" ", "+")
Line 66:     Dim cipherBytes As Byte() = Convert.FromBase64String(cipherText)
Line 67:     Using encryptor As Aes = Aes.Create()
Line 68:         Dim pdb As New Rfc2898DeriveBytes(EncryptionKey, New Byte() {&H49, &H76, &H61, &H6E, &H20, &H4D, _

Source File: h:\root\home\fsolis-001\www\capacitate\App_Code\Generador.vb    Line: 66

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) +12611622
   System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) +115
   System.Convert.FromBase64String(String s) +43
   Generador.Decrypt(String cipherText, String EncryptionKey) in h:\root\home\fsolis-001\www\capacitate\App_Code\Generador.vb:66
   Default2.Page_Load(Object sender, EventArgs e) in h:\root\home\fsolis-001\www\capacitate\Oferta.aspx.vb:21
   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.9224.0