As in title, i have an asp.net 4.0 web forms project working fine.
As i try to move jquery from 1.7.2 to 1.9.0 i get
HTTP 405.0 – Method Not Allowed
As i try to load htm files through ajax.
Sample code causing error
$("#samplediv").load("/htmlParts/ComunicazioniAlerts.htm?p=" + now(), function () {
alert('loaded');
});
Code that works perfectly with older jquery version.
I’m putting the upgrade to stand-by, seems a method/verb problem but shows only when updgrading jquery, as if they changed the way they require pages.
Found.
I use many ajax calls in my app and to avoid repeating i put on top of my app this
In 1.7.2 this wasn’t applying to $.load() that kept using GET method.
Now in 1.9.0 also $.load considers the $.ajaxsetup, sends requests with POST method for htm files and IIS refuses the request.
Possible workaround:
– on IIS enable POST verb on static elements (i don’t know how to do and it’s a trick to put up on all the iis i might use. awful)
– remove POST from $.ajaxsetup, adding again to all the $.ajax requests (boring and lengthy)
– replace all $.load with $.get, having to write code to add the resulting html to desired div (again, boring and lengthy).
Any workaround is appreciated.