Xtraction error: Cryptographic Exception: Bad Data

Version 1

    Error message:

    System.Security.Cryptography.CryptographicException: Bad Data.
    
      at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
      at System.Security.Cryptography.Utils._DecryptData(SafeKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone)
      at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
      at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
      at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
      at System.IO.Stream.Close()
      at Xtraction.Shared.Crypto.CryptService.DecryptStreamToString(Stream input)
      at Xtraction.Model.ApplicationSettings.Initialize()
      at DynamicInjectorb76d685088ec4b149f5f5148ff5caf6e(Object[] )
      at Ninject.Activation.Context.ResolveInternal(Object scope)
      at Ninject.Activation.Context.Resolve()
      at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
      at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
      at Ninject.ResolutionExtensions.TryGet[T](IEnumerable`1 iterator)
      at Xtraction.DependencyManager.MyNinjectDependencyResolver.GetService(Type serviceType)
      at Xtraction.Web.Auth.AuthBase..ctor()
      at Xtraction.Web.Auth.Authenticate..ctor()
      at ASP.auth_authenticate_aspx..ctor()
      at __ASP.FastObjectFactory_app_web_1f3topkf.Create_ASP_auth_authenticate_aspx()
      at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
      at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
      at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
      at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

     

    Problem:

    Xtraction is unable to load the main web page and attempting to open the XtractionSettings.exe is also returning an error.

     

    Cause:

    This error can occur if the settings.dat file has become corrupted and Xtraction is no longer able to read the file.

     

    Solution / Workaround:

    In order to correct this issue the settings.dat file will need to be re-created.

    1. Browse to the ..Xtraction/Data/Configuration folder

    2. Rename the Settings.dat file to Settings_old.dat

    3. Run the XtractionSettings utility, this will create a new settings.dat file

    4. You will need to re-enter the database information and setup the additional settings for email, alerts, etc as these will be lost with the corrupt file.

    5. The licenses will be automatically pulled in and will not need to be re-entered.