Last post Aug 17, 2018 12:47 PM by DA924
Aug 16, 2018 08:57 AM|amendoza29|LINK
Good Day Everyone
I'm having trouble when installing CORS on my ASP.NET WEBAPI Solution
First I install the CORS using the Package Manager Console by typing this
After I install this, I try to to test run my site and I receive the error below
Could not load file or assembly 'System.Web.Http, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT:
after that I found the solution here:
which the solution is
"Update-Package Microsoft.AspNet.WebApi -reinstall."
Now after this I'm not having a problem when running my web application, but my problem right now is
EnablCors does not found in HttpConfiguration
The Solution for this is to install again the CORS using this again "Install-Package Microsoft.AspNet.WebApi.Cors"
But I got another error when I try to run my application which is:
A direct route cannot use the parameter 'controller'
and I point on the line below
I don't know what to do, What I want is to use the cors for my Web API but an error is always showing.
Please help me to solve this.
Aug 16, 2018 12:50 PM|DA924|LINK
It is where you should post.
Aug 17, 2018 07:02 AM|amendoza29|LINK
I have tried but it says, duplicate post.
Aug 17, 2018 12:47 PM|DA924|LINK
Maybe, it will lead to a solution.