On one computer, everything works. Transferred to another and the studio writes in the place where I accept the POST parameters - System.InvalidOperationException: "Incorrect Content-Type
I changed all sorts of Content-Type in jquery, all the same writes Incorrect Content-Type and the specified type. Something in general, I do not understand, something on one computer works, and on the other swears.
What can be wrong?

  • code at least a little will be in question? Have you changed the content-type in jquery like this or something else? - teran
  • Supplement the question with the code in which the exception falls, preferably and the place of the call is also shown. Just not quite clear what and how. - Denis Bubnov

1 answer 1

In jQuery ajax request added

 $.ajax({ url: '/api/param1', headers: { "Content-Type": "application/x-www-form-urlencoded" }.... 

and began to work.