TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sachin Singh
7
55.8k
82.1k
EnableCors attribute is not working after hosting on IIS .
Aug 17 2020 12:07 AM
Cors is enabled in the web api at global level and is working fine locally, i am able to call it from any origin
but after hosting it on IIS 7.5 for testing , the cors policy again started poping up.
public
static
void
Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
EnableCorsAttribute cors =
new
EnableCorsAttribute(
"*"
,
"*"
,
"*"
);
config.EnableCors(cors);
config.Routes.MapHttpRoute(
name:
"DefaultApi"
,
routeTemplate:
"api/{controller}/{id}"
,
defaults:
new
{ id = RouteParameter.Optional }
);
}
Does it need https to work?
Reply
Answers (
1
)
How to set Asp.net core3.0 Cookies as Secure
Get Category And Sub Category.