为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

aluckdog 2018-12-06 23:35:41
我的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啊~~~
查看完整描述

3 回答

?
幕布斯6054654

TA贡献1876条经验 获得超7个赞

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

查看完整回答
反对 回复 2019-01-21
?
幕布斯7119047

TA贡献1794条经验 获得超8个赞

那如何才能支持net.tcp或者named pipe啊?我在host这边已经开启了was的功能和相关的服务了
查看完整回答
反对 回复 2019-01-21
  • 3 回答
  • 0 关注
  • 818 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信