我有一些在httphandler
中处理的ajax请求jQuery.ajax({ type: "GET", url: url, dataType: "text", complete: function (resp, status) {
if (status == "success" || status == "notmodified")
if (resp.responseText != "error")
window.location = resp.responseText;
}
});
有处理程序
public class SocialNetworkUserLogin : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest (HttpContext context)
{
context.Response.Clear();
context.Response.ClearHeaders();
context.Response.ClearContent();
context.Response.ContentType = "text/plain";
//verified something and
context.Session["UnregUser"] = null;
context.Response.Write(Config.SiteDomain + "/Registration.aspx");
}
}
当我检查resp.responseText的值时,它会对Registration.aspx内容进行竞争 而不是样本localhost的url文本:2101 / Registration.aspx 请帮助理解我错误的地方