Pentana Audit Reporting API v6.0.1.5 - authentication fails with http 500 error
An instance of the Pentana Audit Reporting API (v6.0.1.5) may be installed correctly and pass initial testing, but then after a while begin to respond with an http 500 error when the user attempts to authenticate.
The log at API\logs\Api-trace.log shows the following error:
Could not load file or assembly 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'Microsoft.Owin, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
This is due to some missing lines in the file API\Web.config.
Solution
At the end of the file API\Web.config you will find the two closing tags:
</system.serviceModel>
</configuration>
Inbetween them, add the following lines:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="1.6.5135.21930"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.2.2.0" newVersion="4.2.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
After the file is updated, restart the application pool for the API Web service.