Could not load System.Web.Cors in Owin Startup.cs Could not load System.Web.Cors in Owin Startup.cs asp.net asp.net

Could not load System.Web.Cors in Owin Startup.cs


This is surely coming cause of your DLL version is different OR DLL is missing on that environment.

Few steps you require to check:

  • Cors DLL should be there in your BIN directory [On Azure]

  • If it's there then Version of DLL deployed on server and your local both should be same. [You can check in properties]

  • If your version of Cors DLL higher on Azure server, compare to local one then you can
<dependentAssembly>   <assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" />   <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.1" /></dependentAssembly>

Your new version could be your DLL version which are available into the BIN directory.


Have you tried Microsoft.Asp.Net.WebApi.Cors at nuget? https://www.nuget.org/packages/Microsoft.AspNet.WebApi.Cors/5.2.2It's not a dependency for the Cors package because it's for webapi and the only microsoft.owin.cors dependency is on the base microsoft.asp.net.cors (other than the owin packages).