ASP.NET FriendlyUrls و دریافت خطای 401 Unauthorized در حین عملیات Ajax
نویسنده: حسین صفدری
تاریخ: ۱۳۹۲/۰۵/۰۶ ۲۳:۱۰
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
$.ajax({
type: "POST",
url: "/Default.aspx/MyMethod",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
cache: true,
success: function (data) {
$("#plandata").html(data.d);
},
error: function (x, e) {
alert("The call to the server side failed. " + x.responseText);
}
});<system.web.extensions>
<scripting>
<webServices>
<authenticationService enabled="true" />
</webServices>
</scripting>
</system.web.extensions>$.ajax({
type: "POST",
url: "/websrv.asmx/MyMethod",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
cache: true,
success: function (data) {
$("#plandata").html(data.d);
},
error: function (x, e) {
alert("The call to the server side failed. " + x.responseText);
}
});