Need to allow multiple cors specific API action

0

I am using .Net framework 4.5.1 System.Web.Http : 5.2.3.0

I have existing API call i need to add multiple e.g.

[EnableCors(origins: "http://example.com", 
headers: "accept,content-type,origin,x-my-header", methods: "*")]

reference link

After installation System.Web.Http.Cors getting below error message

Server Error in '/' Application.
Could not load file or assembly 'System.Web.Http.Cors, Version=5.1.0.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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Web.Http.Cors, Version=5.1.0.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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Http.Cors, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
asp.net
rest
api
web
asked on Stack Overflow Mar 10, 2020 by Arvind • edited Mar 10, 2020 by James Z

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0