我想使用netTCPbinding,所以我已经更改了我的web配置如下。我正在经历这样的错误:
找不到与绑定net.tcp的端点的方案NetTcpBinding匹配的基址。注册的基本地址计划是http。
如何解决这一问题?
<services>
<service name="DXDirectory.DXDirectoryService" behaviorConfiguration="DXDirectory.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="netTcpBinding" bindingConfiguration="WindowsSecured" contract="DXDirectory.IDXDirectoryService">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:2582/DXDirectoryService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DXDirectory.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceAuthorization principalPermissionMode="UseWindowsGroups" />
<!--<serviceCredentials>-->
<!--<userNameAuthentication userNamePasswordValidationMode="Custom"
membershipProviderName="CustomUserNameValidator"/>-->
<!--</serviceCredentials>-->
</behavior>
</serviceBehaviors>
</behaviors>发布于 2009-08-31 10:35:24
HMm...您已经将基本地址添加到服务/主机部分ok。
快速提问:您是自我托管,还是在IIS中托管?哪个版本的IIS ??
IIS 5/6只支持HTTP连接--您不能在IIS 5/6中承载NetTCP。
在IIS7中,您必须手动执行一系列步骤来启用非HTTP绑定,但这是可能的。关于如何实现这一点,请参见这篇MSDN文章。
自我托管是最好的选择-你得到所有的绑定,并完全控制您的服务被托管。
Marc
发布于 2009-08-31 10:11:23
https://stackoverflow.com/questions/1356739
复制相似问题