Could not load file or assembly ‘SSOSettingsFileReader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b9585ffc9d454e4a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Time to Read: 2 minutes

Today during my work schedule, I was approached by one of the Front End users and the y complained that BizTalk services were returning faults to them. Upon checking up the logs for the BizTalk application, I came across following error.

“Could not load file or assembly ‘SSOSettingsFileReader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b9585ffc9d454e4a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”.

My first reaction to this was: “This is not possible. The assembly has to be in the GAC!!“.

so I went to the GAC located at C:\Windows\Microsoft.NET\assembly\GAC_MSIL\SSOSettingsFileReader\v4.0_1.0.0.0__b9585ffc9d454e4a, the assembly was there.

So why does this error started popping up all of a sudden?

This assembly “SSOSettingsFileReader.dll” is the assembly used by BTDF to read the values from the SSOSettingsFile. This assembly gets deployed every time we do a deployment of  BizTalk application which reads values from SSOSettingsFile. This is generally done by a BTDF deployment and the timestamp in GAC gets updated with the latest deployment.

In my case yesterday I had deployed an application which read values using above assembly. My BTDF file was tailored to restart only the Host Instances for that particular application as it had following entry in app.btdfproj file

<ItemGroup>
  <BizTalkHosts Include="BizTalkServerABCApplicationHost;BizTalkServerABCSendHost"/>
</ItemGroup>

 

This forced the BTDF to restart only two host instances tied to Hosts mentioned above. Now other applications which were using the same file were not aware of this un deployment and deployment of the SSOSettingsFileReader.dll assembly.

Now when any request came to the other applications referring this assembly, they started raising exception mentioned above.

Resolution

The solution to this problem is very simple. A host instance restart helped me solve the problem.

I hope this simple solution helps some one who faces this issue as the error logged in the event log is bit misguiding.

That makes me wonder if the BTDF should be forced to restart only particular host instances only or it should straight away restart all the Host Instances??

I would love to get some opinions on this point in the chat below.

Programmer by profession, curious by nature.