WCF服务没有响应

时间:2014-12-04 20:06:24

标签: c# web-services wcf web-deployment

我正在开发基于WCF的RESTful Web服务。一个我的开发机器我的所有查询工作正常,但当我将服务部署到我的测试网站(在互联网上)时,我的一个GET功能响应HTTP错误400.我的机器和测试站点上的web.config是相同的。 问题函数的合同如下:

[OperationContract]
    [WebInvoke(Method = "GET",
        ResponseFormat = WebMessageFormat.Json,
        BodyStyle = WebMessageBodyStyle.Wrapped,
        UriTemplate = "GetLocationID/{name},{city},{state},{country},{postal}")]
    List<GetLocationIdResult> GetLocationID(string name, string city, string state, string country, string postal);

我用以下网址调用此函数:

<URL>/TalLimoService.svc/GetLocationID/null,New%20York,null,null,null

该服务部署到我访问权限非常有限的网站上。例如,我看不到事件查看器。我可以访问的唯一日志是WCSVC .... log,它提供以下内容:

2014-12-04 19:30:49 W3SVC418 P3NWVPWEB113 50.62.160.139 GET /TalLimoService.svc/GetLocationID/null,New+York,null,null,null - 80 - 87.68.28.239 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/39.0.2171.71+Safari/537.36 - - internal.tucansdev.com 400 0 0 1839 421 4281

换句话说,呼叫到了,并获得了HTTP 400响应。 为什么这会在我的开发服务器上运行,但在部署时失败?

0 个答案:

没有答案