2014-01-30 56 views
1

尝试在IIS 7中设置第二个Web站点时,大部分/所有镜像服务功能除配置为net.tcp的功能外。尝试访问的URL .SVC,我收到以下错误:无法在托管多个站点的IIS中为net.tcp配置WCF服务

Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].

IIS绑定配置:

IIS Site Bindings

高级设置:

Advanced Settings

试图跟随答案堆栈溢出发现,似乎没有工作。 内容服务的web.config中:

<system.serviceModel> 
    <services> 
     <service name="ServiceName"> 
      <endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="" 
       name="basic" contract="ServiceName.IService" /> 
      <endpoint address="nettcp" binding="netTcpBinding" bindingConfiguration="" 
       name="netTCP" contract="ServiceName.IService" /> 
      <host> 
       <baseAddresses> 
        <add baseAddress="http://staging.localhost/ServiceName" /> 
        <add baseAddress="net.tcp://localhost:8033/ServiceName" /> 
       </baseAddresses> 
      </host> 
     </service> 
    </services> 

有没有窍门到的net.tcp绑定?什么是web.config中所需的正确配置?

谢谢!

+0

你有没有尝试添加'net.tcp'到应用程序(进入高级设置,并期待在Behaviors部分下 - 将会有一个名为Enabled Protocols的节点)。 – Tim

+0

@Tim谢谢。是的,我已经添加了这种行为。我应该包含一个截图。 – KevinRF

+0

您的设置看起来不错,Net.TcpListener服务正在运行吗?你有没有尝试重新启动IIS? – PatFromCanada

回答

0

有时屏幕截图有价值1000字。在IIS管理器中,右键单击应用程序“ServiceName”并选择管理应用程序 - >高级设置。在高级设置对话框,请检查您是否已经添加到的net.tcp启用的协议:

enter image description here

+0

感谢您的快速回复。我已经包含了高级设置的屏幕截图。 – KevinRF