Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone,

Thanks to support. I have created a Web API 2 Project and added a controller inside and added few methods with HTTPGet attributes. If i try to access that method from postman client it's working properly. But, If i tries to access them from other apps, I'm getting cross domain origin issue. Please help me to fix this issue.

What I have tried:

I have added config.EnableCors(); in webapiconfig file. Now, I can access api controllers from out side. But, Controllers i have added [EnableCors("*", "*", "*")] this one top of controller. But, It's not working.
Posted
Updated 23-Dec-18 0:06am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900