【发布时间】:2010-10-18 07:02:43
【问题描述】:
大家好,我遇到了一个愚蠢的问题。
我的自定义处理程序在 Asp.NET 开发服务器上 100% 工作,但是当我将站点发布到 IIS 5.1 时,每当我尝试运行 Comment/Find(通过 AJAX 调用查找用户)时(我知道我的命名处理程序 sux!!! :)
我收到此错误:
页面无法显示 您要查找的页面无法显示,因为页面地址不正确。
请尝试以下方法:
* If you typed the page address in the Address bar, check that it is entered correctly.
* Open the home page and then look for links to the information you want.
HTTP 405 - 资源不允许 互联网信息服务
技术信息(供支持人员使用)
* More information:
Microsoft Support
我的 AJAX 调用代码是:
function findUser(skip, take) {
http.open("post", 'Comment/FindUser', true);
//make a connection to the server ... specifying that you intend to make a GET request
//to the server. Specifiy the page name and the URL parameters to send
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader('Criteria', document.getElementById('SearchCriteria').value);
http.setRequestHeader("Skip", skip);
http.setRequestHeader("Take", take);
http.setRequestHeader("Connection", "close");
//display loading gif
document.getElementById('ctl00_ContentPlaceHolder1_DivUsers').innerHTML = 'Loading, Please Wait...<br /><img src="Images/loading.gif" /><br /><br />';
//assign a handler for the response
http.onreadystatechange = function() { findUserAction(); };
//actually send the request to the server
http.send(null);
}
谁能帮帮我??
【问题讨论】:
-
这是停止在开发中使用 cassini 的充分理由和机会
-
真的吗?所以你应该使用IIS?不是 asp.net 开发服务器。
标签: c# ajax httphandler iis-5