2015-02-09 109 views
0

我想部署一個在Visual Studio中創建的wcf服務。 我幾乎肯定它是wcf服務配置或IIS本身中的配置問題。將WCF Tcp.net服務添加到IIS for Visual Studio 2013以及如何測試它

我正在使用該服務的配置如下:

<system.webServer> 
    <directoryBrowse enabled="true" /> 
</system.webServer> 
<system.serviceModel> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="CandidateServiceBehavior"> 
     <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="true" /> 
     <serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<services> 
    <service name="SurveyService.SurveyService" behaviorConfiguration="CandidateServiceBehavior"> 
    <endpoint address="/Survey/SurveyService" binding="netTcpBinding" name="CandidateServiceEndPoint" contract="Prometric.Census.SurveyService.ISurveyService" /> 
    <endpoint address="/Survey/SurveyService/mex" binding="mexTcpBinding" contract="IMetadataExchange" /> 
    </service> 
</services> 
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false" /> 
</system.serviceModel> 

我從Visual Studio部署該服務一次,並指出一個新的網站在IIS上與指向部署文件夾下面的設置

enter image description here

然後在此之後IIS中你可以看到該網站處於未知狀態:

enter image description here

從這裏我無法連接到服務或找到它是否正在運行。我已經嘗試了命令/ an:find/i「9015」並且什麼也沒找到,所以我假設該服務甚至沒有運行。

如果我在哪裏更改WCF服務和IIS的綁定來使用http,而不是一切正常。 (應該說使用http不是一個選項)

另外,沒有得到服務啓動和運行我不確定如何測試服務作爲TCP,我能夠只添加一個服務引用,因爲你會一個http sefvice?正如你所看到的,我對tcp方面很陌生,如果我遺漏了任何重要的信息,請讓我知道,這樣我就可以在問題中排除它。

回答

相關問題