无法向WCF服务方法发出Get请求

时间:2016-04-26 13:46:57

标签: asp.net wcf c#-4.0 iis-8 orchardcms-1.7

我在一个网站(Https Port 443)上使用有效的SSL证书在IIS(8.5)上托管了Web服务(WCF)。

当我通过http浏览到应用程序时,我能够看到所有服务方法,并且可以调用服务方法来返回Json数据。然后我尝试通过https调用它们,服务将列出所有方法但拒绝运行方法并将抛出错误。

WebHost failed to process a request.


Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/50848483
 Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'https://MyURL?tea…d=9289&callback=jQuery1111010458340654899811_1461657725831&_=1461657725832'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening. ---> System.ServiceModel.EndpointNotFoundException: There was no channel actively listening at 'https://hypervtest.first-sports.com/RFU/FSI-Services-Host/Competitions.svc/json/GetSeasons?tea…d=9289&callback=jQuery1111010458340654899811_1461657725831&_=1461657725832'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening.
   at System.ServiceModel.Activation.HostedHttpTransportManager.HttpContextReceived(HostedHttpRequestAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
 Process Name: w3wp
 Process ID: 11016

这些服务器方法已在不同的服务器上运行。 我试过复制Config并设置Bindings和其他服务器一样但没有运气。

欢迎任何建议。

1 个答案:

答案 0 :(得分:0)

添加:[WebInvoke(Method =" GET")]