Since installing Service Pack 1, we have encountered problems when calling asmx pages from JQuery client code.
IIS points jQuery mail to its default 404 page.
We made the role of our environment to claim that this problem was caused by SP1, and tests confirm this.
Pending fix @MS
Technologies used:
ASP.Net 4.0 - JQuery - IIS 7.5 - Windows 2008 R2 SP1
- Bart
Example code call (front-end):
// Code to load vars... $.ajax({ type: "POST", url: "/Handlers/ProductRating.asmx/RateProduct", data: "{'uniqueId':'" + uniqueId + "','productId':'" + productId + "','points':" + points.toString() + ",'showOwnScore':" + showOwnScore.toString() + "}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(response) { alert('success'); }, failure: function(msg) { alert('something went wrong'); } }); }
Internal Code Code:
[ScriptService] public class ProductRating : System.Web.Services.WebService { [WebMethod(EnableSession=true)] public RateProductResponse RateProduct(Guid uniqueId, Guid productId, int points, bool showOwnScore) {
Snapshot 1: Service Pack 1: http://img812.imageshack.us/i/capture2r.png/
Snapshot2: without SP1: http://img190.imageshack.us/i/capture1qx.png/
source share