我想部署一个在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上与指向部署文件夹下面的设置
然后在此之后IIS中你可以看到该网站处于未知状态:
从这里我无法连接到服务或找到它是否正在运行。我已经尝试了命令/ an:find/i“9015”并且什么也没找到,所以我假设该服务甚至没有运行。
如果我在哪里更改WCF服务和IIS的绑定来使用http,而不是一切正常。 (应该说使用http不是一个选项)
另外,没有得到服务启动和运行我不确定如何测试服务作为TCP,我能够只添加一个服务引用,因为你会一个http sefvice?正如你所看到的,我对tcp方面很陌生,如果我遗漏了任何重要的信息,请让我知道,这样我就可以在问题中排除它。