我在QA环境中的连接时遇到404 - Not Found Error。我们的开发集成环境中没有相同代码的问题。 我看过这里报道的其他404,并没有找到一个好的比赛。 运行fiddler,传出请求在两种环境中都非常相似。
有关如何进一步排除故障的任何建议?感谢。
*测试服务器连接确定*
var connection = $.connection('http://sdbntrwebdev01.sddev.lpl.com/AlertsService/request/' + token);
POST /AlertsService/request/7077342FE79A4EA99B939C24528EFB8E/negotiate HTTP/1.1
Host: sdbntrwebdev01.sddev.lpl.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: http://sdbntrwebdev01.sddev.lpl.com/alertsservice/healthcheck.aspx
Cookie: ASP.NET_SessionId=zadzj3je5ofm3e51350jl25b; Auth=7077342FE79A4EA99B939C24528EFB8E
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 0
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 27 Mar 2012 23:51:41 GMT
* QA服务器连接获得404 *
var connection = $.connection('http://sdalertwebqa01.qadmz.lpl.com/AlertsService/request/' + token);
POST /AlertsService/request/B8E02A155BBF4C55AC4E715C7F1CA968/negotiate HTTP/1.1
Host: sdalertwebqa01.qadmz.lpl.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: http://sdalertwebqa01.qadmz.lpl.com/alertsservice/healthcheck.aspx
Cookie: ASP.NET_SessionId=4zx05otp5oztqjqxvdaafa5e; Auth=B8E02A155BBF4C55AC4E715C7F1CA968
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 0
HTTP/1.1 404 Not Found
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 27 Mar 2012 23:48:12 GMT
Content-Length: 1245
答案 0 :(得分:1)
这里的另一个人找到答案,我将分享。 在IIS7中,有一个名为“URLRoutingModule-4.0”的设置。 “编辑托管模块”对话框还包含一个复选框“仅对ASP.NET应用程序或托管处理程序的请求调用”。取消选中该复选框。
此设置位于“默认网站”级别,双击功能视图中的“模块”以获取模块列表,双击行项“URLRoutingModule-4.0”以启动“编辑管理模块”对话框。