Exception on login.aspx

Sep 26, 2011 at 11:05 AM

I just changed web.config to point to my SQL Server instance (i ran the included sql file). Visual Studio 2010 stopped with this exception 

System.Security.Cryptography.CryptographicException was caught
  Message=Length of the data to decrypt is invalid.
  Source=mscorlib
  StackTrace:
       at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
       at IMS_Base.clsEncrypt.DecryptTripleDES(String sOut, String sKey) in ...\IMS\IMS_Base\IMS_Base\clsEncrypt.vb:line 80
       at IMS_Base.clsEncrypt.GetDecryptString(String sSource, String sKey) in ...\IMS\IMS_Base\IMS_Base\clsEncrypt.vb:line 84
       at IMS_Base.clsDatabase.GetConnectionString() in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 1593
       at IMS_Base.clsDatabase.get_ConnectionString() in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 85
       at IMS_Base.clsDatabase.GetConnection(String theConnectionString) in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 1514
       at IMS_Base.clsDatabase.get_Connection() in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 96
       at IMS_Base.clsDatabase.CloseConnection() in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 1559
       at IMS_Base.clsDatabase.GetDataTable(String strStoredProcedure, clsDBIParameterCollection colParams, Int32 intStartRec, Int32 intNumRecs, String strTable) in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 1116
       at IMS_Base.clsDatabase.GetDataTable(String strStoredProcedure, clsDBIParameterCollection colParams, String strTable) in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 1130
       at IMS_Base.clsDatabase.GetList(String strTable, clsDBIParameterCollection colParams, Boolean bActiveRecordsOnly) in ...\IMS\IMS_Base\IMS_Base\clsDatabase.vb:line 763
  InnerException:

Coordinator
Oct 6, 2011 at 9:15 PM

The web.config needs to have an encrypted password, check the way the connection string is built to remove this requirement.

Jan 18, 2014 at 6:43 PM
Can you please paste your connection string here thanks