Article Details
Id:14385
Product:finPOWER Connect
Type:NEW
Version:3.00.05
Opened:07/03/2017
Closed:08/03/2017
Released:10/04/2017
Job: J018680

MotorWeb; requests failing when run under IIS web server

MotorWeb requests may fail when run under IIS web server. This appears to be an issue with the Certificate MotorWeb uses and how IIS is locked down.

The error contains this message:

<Error xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Message>Failed to execute custom Web Service Script 'WSMW'.</Message>
  <Code />
  <InternalMessage>   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
   at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromBlob(Byte[] rawData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)
   at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password)
   at Intersoft.ISRuntime3.ISWebUtilities.GetCertificateFromBase64String(String certificateText, String certificatePassword, X509Certificate2& certificate)</InternalMessage>
</Error>

A change has been made to try and create the Certificate in the local computer store rather than current user store, falling back to the default of current user store if this fails.

The workaround is to change the IIS Advanced Setting "Load User Profile" to True.