公司布了一个服务,大致的架子如下:

问题
一、HTTP status 403: Access Forbidden
原因:访问拒绝。(是一个Ashx去访问一个.asmx,两个在不同服务器上;asmx单独能直接访问,ashx程序不能访问)基本断定没有到达.asmx服务器。
两种可能:
1. asmx服务器不能访问。(单独能访问,说明服务器是通的)
2. .asmx的访问权限问题(它是虚拟目录,应用程序)。配置了一下IIS的访问权限,问题得到了解决。
二、服务器未能识别 HTTP 头 SOAPAction 的值
{"ErrorMessage":"System.Web.Services.Protocols.SoapException: 服务器未能识别 HTTP 头 SOAPAction 的值: http://service.zdsmis.cn/IGetReportData。
在 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
在 System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
在 System.Web.Services.Protocols.SoapServerProtocol.Initialize()
在 System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
在 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)","ErrorCode":-404,"Header":null,"Data":null}
.ashx服务器没有更新.asmx服务器的服务引用,导致.ashx上的代理与访问.asmx的代理不匹配。
博客讨论了在接口调试中遇到的两个问题:1) HTTP状态码403: Access Forbidden,原因是服务器访问权限配置不当,通过调整IIS的访问权限设置得以解决。2) 服务器未能识别HTTP头SOAPAction的值,是由于.ashx服务器的服务引用未更新,导致代理不匹配,更新引用后问题解决。

3279

被折叠的 条评论
为什么被折叠?



