Ravi Shah
Ravi Shah

Reputation: 873

Access-Control-Allow-Origin header is present on the requested resource

I am uploaded Multi File Using Web api with jquery. In my one localhost application i upload multiple file using look like this:

Multiple file upload

Now, When i click the submit button all files data, images are save in using web api through second localhost application. my form code describe here.

Code Description

When i press submit button gives error.. That display below: Error

Upvotes: 2

Views: 405

Answers (1)

Rishi Tiwari
Rishi Tiwari

Reputation: 1041

You need to enable cross origin in your WebAPI like below

[EnableCors(origins: "http://yourdomain", headers: "*", methods: "*")]

Upvotes: 1

Related Questions