My code works just fine locally but after I published to server I keep getting this 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)
I don't even have a Microsoft.Owin Version 3.0.1.0 in this project, the version used in this project is 2.0.0.0. Then I tried to update the Owin and the dependencies file but to no avail. Even after deleting the Bin folder and rebuild the code I am still having the same issue.
Anybody can help me on this?
EDIT: After adding this to the Web.Config:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
This is what I got:
Could not load file or assembly 'file:///C:\Project\bin\Microsoft.Owin.dll' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Verify the installed Microsoft.Owin package version [In Manage Nuget Packages] with Web.config -> Microsoft.Owin
version.
Both these versions should match.
This one worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With