Web
Analytics
jquery post example using asp.net web api 2 with cross origin - Tutorial

For Consultation : +91 9887575540

Stay Connected :

  1. Install Microsoft.AspNet.WebApi.Cors using nuget package manager console
  2. Make Changes at webapi.config
  3. var enableCorsAttribute = new EnableCorsAttribute(“*”,
  4. “*”,
    “*”);
    config.EnableCors(enableCorsAttribute);
  5. Create web api 2 controller with entity framework, please select appropriate model and context class

  6. 7. Client Program which making POST request.




     

    Due to some IIS permission issue , PUT and DELETE verbs does’t work, In that case don’t forget to update web.config file

    Download Source Code




Select your currency