Interesting dependency issue...
VS2015.3, .NET45 updating Microsoft.Owin from 3.0.0 to 3.0.1 (traced this update to be the problem - wanting to install https://www.nuget.org/packages/IdentityServer3.AccessTokenValidation/)
it works locally on IIS Express
but publish to Azure website: (am removing additional files at destination on azure publish straight from VS). restarted and deleted all files from azure webserver too.
web.config translation looks okay
<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>
Edit Bruce Chen's answer pointed me in the direction of Kudu (Azure - Development Tools, Advanced Tools)
I downloaded the Owin dll, and it was the wrong version ie 3.0.0
To fix I cleared out all package artifacts from my solution
git clean -xfd (be careful)
Then rebuilt
In general, this means that the .NET Assembly loader could not find the assembly with specific version that was referenced. Please make sure this assembly with version 3.0.1.0 could be found in your Azure website and the version matches the definition in your web.config via KUDU or FTP client.
If you are using Visual Studio right click the project --> Manage NuGet Packages --> Updates --> select the Owin nuget --> Click "Update". As of today, the latest version is 4.0.0.
If you are using Visual Studio right click the project --> Manage NuGet Packages --> Updates --> select the Owin nuget --> Click "Update". As of today, the latest version is 4.0.0. Hope it works out fine!
I wasted a couple of hours on this too because the reference installed by nuget had version 3.0.0 despite the nuget package being labelled 3.0.1
Making the old version newer than the new version fixed my problem:
<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>
*Edit: I think(but not certain) that the reason my version was still 3.0.0.0 was because the bin folder got caught in my repo and nuget didn't want to write over the dll
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