2016-04-26 50 views
1

我使用有效的SSL證書在網站(Https端口443)上的IIS(8.5)上託管了Web服務(WCF)。無法獲取對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 

這些服務器方法已經運行在不同的服務器上。 我試着複製配置並設置綁定和其他服務器一樣,但沒有運氣。

任何建議將受到歡迎。

回答

0

添加這個:[WebInvoke(Method =「GET」)]

+0

這已經在另一個沒有這個屬性的環境上工作。 我認爲這是由於配置不知何故.. – hussian