I have installed Microsoft.AspNet.WebApi.Cors
package using Install-Package Microsoft.AspNet.WebApi.Cors
in my WebApi project(.net framework 4.5.2) and now I'm getting below error while compiling the project.
Reference: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
Assembly 'System.Web.Http.Cors, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
You need to install following nuget package for this.
Install-Package Microsoft.AspNet.WebApi.Cors.ko -Version 5.0.0
This will work.
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