[WCF]:Could not find a base address that matches scheme net.pipe for the endpoint with binding NetNamedPipeBinding

我的web.config中wcf的配置如下:

 

 <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WCFHostDemo.Contracts.Lib.HelloWorldServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="WCFHostDemo.Contracts.Lib.HelloWorldServiceBehavior"
          name="WCFHostDemo.Contracts.Lib.HelloWorldService">
        <endpoint address="wsHttp" binding="wsHttpBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>
        <endpoint address="netPipe" binding="netNamedPipeBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>
        <endpoint address="basicHttp" binding="basicHttpBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <!--<endpoint address="netTcp" binding="netTcpBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>-->
      </service>
    </services>
  </system.serviceModel>

但是当我试图运行这个 webapplication 为宿主的wcf 服务时,报出黄页,错误如下

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

我查了一些资料,有人说在services节点下面添加host节点,具体如下

<services>
      <service behaviorConfiguration="WCFHostDemo.Contracts.Lib.HelloWorldServiceBehavior"
          name="WCFHostDemo.Contracts.Lib.HelloWorldService">
        <endpoint address="wsHttp" binding="wsHttpBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>
        <endpoint address="netPipe" binding="netNamedPipeBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>
        <endpoint address="basicHttp" binding="basicHttpBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <!--<endpoint address="netTcp" binding="netTcpBinding" contract="WCFHostDemo.Contracts.Lib.IHelloWorldService"></endpoint>-->
        <host>
          <baseAddresses>

            <add baseAddress = "net.pipe://localhost/"/>
          </baseAddresses>
        </host>
      </service>
    </services>

但是我依然得到前面的错误提示,郁闷!!!!!!!!!!

麻烦请问各位大侠,这个issue 如何fixed啊~~~

aluckdog
浏览 819回答 3
3回答

幕布斯6054654

单纯的web部署,不支持tcp,pipe。

幕布斯7119047

那如何才能支持net.tcp或者named pipe啊?我在host这边已经开启了was的功能和相关的服务了
打开App,查看更多内容
随时随地看视频慕课网APP