开发者

jquery ajax loads page instead of asp.net method

I'm calling such ajax code:

$.ajax({
       type: "POST",
开发者_如何学运维       url: "/AjaxHelper.aspx/Method",
       data: "{}",
       contentType: "application/json; charset=utf-8",
       dataType: "json",
       success: function (result) {
       }
    }

Codebehind function inside AjaxHelper.aspx:

[WebMethod()]
public static string Method()
{
   return "some string";
}

But it just loads the content of the AjaxHelper.aspx page, it doesn't invoke Method(). Now every ajax method doesn't work on the website. The file AjaxHelper.aspx lies in the route of the website folder.

Eveything works fine on my local machine and everything worked fine before yesterday production server was upgraded with this patch for UrlRouting: http://support.microsoft.com/kb/980368

Maybe some other official updates were installed for the Windows Server 2008 x64, I dont know tight now. What do I do to solve the problem of invoking Method() from jquery ajax?


Thanks to vladimir77, he pointed out thath it was an official issue with the extensionless url patch I installed.

Here are the solutions:

http://www.shanmcarthur.net/Default.aspx?DN=7d0cd525-bbc5-46c3-8096-95f93827aeea

http://forums.iis.net/p/1176071/1978608.aspx#1978608

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜