Home > MVC > Cross-Origin Request Blocked: ASP.NET MVC

Cross-Origin Request Blocked: ASP.NET MVC


While i try to call the Web-Api service through JQuery, i am unable to receive the complex type collection in my client side, it throws error message in my console table of my browser as below.



Add the below code in WEB-API project web.config file

            <!-- Adding the following custom HttpHeader will help prevent CORS from stopping the Request-->
            <add name="Access-Control-Allow-Origin" value="*" />


For source and more detail click here

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: