使用 App.Config 的 Windows 服务中的 WCF 命名管道 [英] WCF Named Pipe in Windows Service using App.Config

查看:35
本文介绍了使用 App.Config 的 Windows 服务中的 WCF 命名管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很沮丧.好的,这是错误.

<块引用>

在 net.pipe://localhost/MyIpcAppToService 上没有侦听端点可以接受消息.这通常是由不正确的地址或 SOAP 操作引起的.有关详细信息,请参阅 InnerException(如果存在).

我终于让 App.Config 文件工作了,至少没有抱怨.

当前应用程序配置

<endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange"/><主机><基地址><add baseAddress="http://localhost:8733/MyService/"/></baseAddresses></host></服务></服务><行为><服务行为><行为名称="MyServiceBehavior"><!-- 为避免泄露元数据信息,请在部署前将以下值设置为 false --><serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/><!-- 要在故障中接收异常详细信息以进行调试,请将以下值设置为 true.在部署前设置为 false 以避免泄露异常信息 --><serviceDebug includeExceptionDetailInFaults="true"/><dataContractSerializer maxItemsInObjectGraph="2147483647"/></行为></serviceBehaviors></行为><协议映射><add scheme="http" binding="wsHttpBinding" bindingConfiguration="MyAppToServiceEndpointBinding"/></protocolMapping><绑定><wsDualHttpBinding><!-- https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/wshttpbinding --><绑定名称="MyAppToServiceEndpointBinding"交易流=真"sendTimeout="00:01:00"maxReceivedMessageSize="2147483647"messageEncoding="Mtom"></binding></wsDualHttpBinding></绑定><serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"><baseAddressPrefixFilters><add prefix="http://localhost:8733"/></baseAddressPrefixFilters></serviceHostingEnvironment></system.serviceModel><应用设置><add key="countfiles" value="7"/><add key="logfilelocation" value="abc.txt"/></appSettings></配置>

我曾经有过:

并在 Windows 服务 OnStart() 事件中:

(下面的代码现在被注释掉了,在这个问题帖子中,因为 App.config 文件应该启动 named.pipe.)

public Boolean CreatePipeServer(){string eventText = $"My Service: CommAppToService::CreatePipeServer(IPC App to Service){Environment.NewLine}";尝试{如果(空!= this.ServiceParent.HostIpcAppToService)this.ServiceParent.HostIpcAppToService = null;string pipeBaseAddress = @"net.pipe://localhost/MyIpcAppToService";this.ServiceParent.HostIpcAppToService = new ServiceHost(typeof(IpcAppToService), new Uri(pipeBaseAddress));NetNamedPipeBinding pipeBinding = new NetNamedPipeBinding(){//ReceiveTimeout = new TimeSpan(0, 0, 0, 0, Constants.My_TimeoutMsSendReceive),//SendTimeout = new TimeSpan(0, 0, 0, 0, Constants.My_TimeoutMsSendReceive),};this.ServiceParent.HostIpcAppToService.AddServiceEndpoint(typeof(IIpcAppToService), pipeBinding, "MyIpcAppToService");this.ServiceParent.HostIpcAppToService.UnknownMessageReceived += HostIpcAppServer_UnknownMessageReceived;this.ServiceParent.HostIpcAppToService.Faulted += HostIpcAppServer_Faulted;this.ServiceParent.HostIpcAppToService.Closing += HostIpcAppServer_Closing;this.ServiceParent.HostIpcAppToService.Closed += HostIpcAppServer_Closed;this.IpcAppToService = new IpcAppToService();this.IpcAppToService.ApplyDispatchBehavior(this.ServiceParent.HostIpcAppToService);this.IpcAppToService.Validate(this.ServiceParent.HostIpcAppToService);this.ServiceParent.HostIpcAppToService.Open();返回真;}

我读到该服务将自动启动放置在 App.Config 文件中的服务,实际上是 MyExeName.exe.config 文件.我一直在查看代码,发现它几乎相同,因此我将 http:// 替换为 net.pipe://.

可悲的是,旧代码、新代码、中间代码,什么都没有.我一直收到同样的错误.

我使用以下内容从我的桌面应用程序连接到服务.

public static Boolean ConnectToService(){尝试{var callback = new IpcCallbackAppToService();var context = new InstanceContext(callback);var pipeFactory = new DuplexChannelFactory(context, new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/MyIpcAppToService"));Program.HostIpcAppToService = pipeFactory.CreateChannel();Program.HostIpcAppToService.Connect();CommAppToService.IsPipeAppToService = true;返回真;}捕获(异常前){//记录异常.Errors.LogException(ex);}返回假;}

不管它值多少钱,这里是:

界面

[ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IIpcCallbackAppToService))]公共接口 IIpcAppToService{[操作合同(IsOneWay = false)][FaultContractAttribute(typeof(IpcAppToServiceFault))]UInt16 GetServiceId();...}

服务:

[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]公共类 IpcAppToService : IIpcAppToService, IErrorHandler{公共静态 IIpcCallbackAppToService 回调 { get;放;} = 空;公共无效 OpenCallback(){IpcAppToService.Callback = OperationContext.Current.GetCallbackChannel();}公共无效 CloseCallback(){IpcAppToService.Callback = null;}public void SendMessage(字符串消息){//MessageBox.Show(message);}公共 UInt16 GetServiceId(){返回 Constants.My_Id_AppToService;}...}

内部异常来自我的桌面 WinForms 应用程序(注意,没有比这个更进一步的内部异常了.):

<块引用>

在您的本地机器上找不到管道端点‘net.pipe://localhost/MyIpcAppToService’."

为什么我总是看到这个错误?

第一个回答后更新

我想采取的方向与答案相反,但相同,即服务以 App.config 开始,client 使用 C#代码.

遗憾的是,我仍然遇到同样的错误.

修改服务器端 App.config

<基地址><add baseAddress="http://localhost:8733/MyService/"/></baseAddresses></host></服务></服务><行为><服务行为><行为名称="BehaviorMyService"><!-- 为避免泄露元数据信息,请在部署前将以下值设置为 false --><serviceMetadata httpGetEnabled="true"httpsGetEnabled="true"/><!-- 要接收故障中的异常详细信息以进行调试,请将以下值设置为 true.在部署前设置为 false 以避免泄露异常信息 --><serviceDebug includeExceptionDetailInFaults="true"/><dataContractSerializer maxItemsInObjectGraph="2147483647"/></行为></serviceBehaviors></行为><绑定><netNamedPipeBinding><!-- https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/wshttpbinding --><绑定名称="EndpointBindingMyAppToService"closeTimeout="00:01:00"openTimeout="00:01:00"接收超时=00:10:00"sendTimeout="00:01:00"交易流=假"transferMode="缓冲"transactionProtocol="OleTransactions"hostNameComparisonMode="StrongWildcard"maxBufferPoolSize="524288"maxBufferSize="65536"maxConnections="10"maxReceivedMessageSize="2147483647"><安全模式=无"><transport protectionLevel="None"/></安全></binding></netNamedPipeBinding></绑定><serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"><baseAddressPrefixFilters><add prefix="http://localhost:8733"/></baseAddressPrefixFilters></serviceHostingEnvironment></system.serviceModel><应用设置><add key="countfiles" value="7"/><add key="logfilelocation" value="abc.txt"/></appSettings></配置>

修订的客户端 C# 代码:

var callback = new IpcCallbackAppToService();InstanceContext context = new InstanceContext(callback);NetNamedPipeBinding 绑定 = new NetNamedPipeBinding();binding.Security.Mode = NetNamedPipeSecurityMode.None;EndpointAddress endpointAddress = new EndpointAddress("net.pipe://localhost/MyIpcAppToService");var pipeFactory = new DuplexChannelFactory(context, binding, endpointAddress);Program.HostIpcAppToService = pipeFactory.CreateChannel();Program.HostIpcAppToService.Connect();CommAppToService.IsPipeAppToService = true;

该服务没有抛出我可以检测到的异常,因为 EventViewer 是干净的,只有 OnStart() 成功完成的消息.我知道系统会处理 App.config 文件,就像之前我遇到错误时一样,Windows 事件查看器 会一直抱怨,但不会了.

以下是我使用的一些 Microsoft 文档:



IIS 站点(启用 net.pipe)


客户端(控制台应用程序)

 ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();var 结果 = client.GetData(34);Console.WriteLine(result);

客户端 app.config(自动生成)
我使用 http 地址(服务元数据 GET 地址 http://localhost:8733/Service1.svc?wsdl) 生成配置.

 <绑定><netNamedPipeBinding><绑定名称="NetNamedPipeBinding_IService1"><安全模式=无"/></binding></netNamedPipeBinding></绑定><客户><端点地址="net.pipe://mynetpipe/Service1.svc/MyIpcAppToService"binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IService1"contract="ServiceReference1.IService1" name="NetNamedPipeBinding_IService1"/></客户端></system.serviceModel>

如果有什么我可以帮忙的,请随时告诉我.

I am frustrated. Okay, here is the error.

There was no endpoint listening at net.pipe://localhost/MyIpcAppToService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

I finally got the App.Config file working, at least no complaints.

Current App.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
    </startup>
    <system.serviceModel>
        <services>
            <service behaviorConfiguration="MyServiceBehavior" name="MyService.Communication.IpcAppToService">
                <endpoint address="net.pipe://localhost/MyIpcAppToService" binding="wsDualHttpBinding" bindingConfiguration="MyAppToServiceEndpointBinding" contract="MyIpc.IIpcAppToService"/>
                <endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange"/>
                <host>
                    <baseAddresses>
                        <add baseAddress="http://localhost:8733/MyService/"/>
                    </baseAddresses>
                </host>
            </service>
  </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="MyServiceBehavior">
                    <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
                    <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
                    <!-- 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="true"/>
                    <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <protocolMapping>
            <add scheme="http" binding="wsHttpBinding" bindingConfiguration="MyAppToServiceEndpointBinding" />
        </protocolMapping>
        <bindings>
            <wsDualHttpBinding>
                <!-- https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/wshttpbinding -->
                <binding name="MyAppToServiceEndpointBinding"
                                 transactionFlow="true"
                                 sendTimeout="00:01:00"
                                 maxReceivedMessageSize="2147483647"
                                 messageEncoding="Mtom">
                </binding>
            </wsDualHttpBinding>
        </bindings>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
            <baseAddressPrefixFilters>
                <add prefix="http://localhost:8733"/>
            </baseAddressPrefixFilters>
        </serviceHostingEnvironment>
    </system.serviceModel>
    <appSettings>
        <add key="countoffiles" value="7"/>
        <add key="logfilelocation" value="abc.txt"/>
    </appSettings>
</configuration>

I used to have:

<endpoint address="http://localhost:8733/MyIpcAppToService" ...

and in the Windows Service OnStart() event:

(this following code is now commented out, as of this question post, as the App.config file is supposed to start the named.pipe.)

public Boolean CreatePipeServer()
{
    string eventText = $"My Service: CommAppToService::CreatePipeServer(IPC App to Service){Environment.NewLine}";
    try
    {
        if (null != this.ServiceParent.HostIpcAppToService)
            this.ServiceParent.HostIpcAppToService = null;

        string pipeBaseAddress = @"net.pipe://localhost/MyIpcAppToService";
        this.ServiceParent.HostIpcAppToService = new ServiceHost(typeof(IpcAppToService), new Uri(pipeBaseAddress));
        NetNamedPipeBinding pipeBinding = new NetNamedPipeBinding()
        {
            //ReceiveTimeout = new TimeSpan(0, 0, 0, 0, Constants.My_TimeoutMsSendReceive),
            //SendTimeout = new TimeSpan(0, 0, 0, 0, Constants.My_TimeoutMsSendReceive),
        };
        this.ServiceParent.HostIpcAppToService.AddServiceEndpoint(typeof(IIpcAppToService), pipeBinding, "MyIpcAppToService");
        this.ServiceParent.HostIpcAppToService.UnknownMessageReceived += HostIpcAppServer_UnknownMessageReceived;
        this.ServiceParent.HostIpcAppToService.Faulted += HostIpcAppServer_Faulted;
        this.ServiceParent.HostIpcAppToService.Closing += HostIpcAppServer_Closing;
        this.ServiceParent.HostIpcAppToService.Closed += HostIpcAppServer_Closed;

        this.IpcAppToService = new IpcAppToService();
        this.IpcAppToService.ApplyDispatchBehavior(this.ServiceParent.HostIpcAppToService);
        this.IpcAppToService.Validate(this.ServiceParent.HostIpcAppToService);
        this.ServiceParent.HostIpcAppToService.Open();

        return true;
    }

I read that the service will AUTOMATICALLY start services placed in the App.Config file, really the MyExeName.exe.config file. I kept looking at the code and saw that it was nearly identical, so I replaced the http:// with net.pipe://.

Sadly, old code, new code, in between code, all nothing. I keep receiving the same error.

I use the following to connect to the service from my desktop application.

public static Boolean ConnectToService()
{
    try
    {
        var callback = new IpcCallbackAppToService();
        var context = new InstanceContext(callback);
        var pipeFactory = new DuplexChannelFactory<IIpcAppToService>(context, new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/MyIpcAppToService"));
        Program.HostIpcAppToService = pipeFactory.CreateChannel();
        Program.HostIpcAppToService.Connect();
        CommAppToService.IsPipeAppToService = true;

        return true;
    }

    catch (Exception ex)
    {
        // Log the exception.
        Errors.LogException(ex);
    }

    return false;
}

For whatever it is worth, here is:

Interface

[ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IIpcCallbackAppToService))]
public interface IIpcAppToService
{
    [OperationContract(IsOneWay = false)]
    [FaultContractAttribute(typeof(IpcAppToServiceFault))]
    UInt16 GetServiceId();

    ...
}

Service:

[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
public class IpcAppToService : IIpcAppToService, IErrorHandler
{
    public static IIpcCallbackAppToService Callback { get; set; } = null;

    public void OpenCallback()
    {
        IpcAppToService.Callback = OperationContext.Current.GetCallbackChannel<IIpcCallbackAppToService>();
    }

    public void CloseCallback()
    {
        IpcAppToService.Callback = null;
    }

    public void SendMessage(string message)
    {
        //MessageBox.Show(message);
    }

    public UInt16 GetServiceId()
    {
        return Constants.My_Id_AppToService;
    }

    ...
}

Inner Exception from my desktop WinForms Application (Note, there were no further inner exceptions than this one.):

"The pipe endpoint 'net.pipe://localhost/MyIpcAppToService' could not be found on your local machine."

Why do I keep seeing this error?

UPDATE AFTER 1ST ANSWER

The direction that I would like to take is opposite of the answer, yet the same, namely that the service starts with the App.config and the client uses C# code.

Sadly, I still get the same error.

Revised Server Side App.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
    </startup>
    <system.serviceModel>
        <services>
            <service behaviorConfiguration="BehaviorMyService" name="MyService.Communication.IpcAppToService">
                <endpoint address="net.pipe://localhost/MyIpcAppToService"
                                    binding="netNamedPipeBinding"
                                    bindingConfiguration="EndpointBindingMyAppToService"
                                    contract="MyIpc.IIpcAppToService"
                                    />
                <endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange"/>
                <host>
                    <baseAddresses>
                        <add baseAddress="http://localhost:8733/MyService/"/>
                    </baseAddresses>
                </host>
            </service>
        </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="BehaviorMyService">
                    <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
                    <serviceMetadata httpGetEnabled="true"
                                                     httpsGetEnabled="true"
                                                     />
                    <!-- 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="true"/>
                    <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
            <netNamedPipeBinding>
                <!-- https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/wcf/wshttpbinding -->
                <binding name="EndpointBindingMyAppToService"
                                 closeTimeout="00:01:00"  
                                 openTimeout="00:01:00"   
                                 receiveTimeout="00:10:00"   
                                 sendTimeout="00:01:00"  
                                 transactionFlow="false"   
                                 transferMode="Buffered"   
                                 transactionProtocol="OleTransactions"  
                                 hostNameComparisonMode="StrongWildcard"   
                                 maxBufferPoolSize="524288"  
                                 maxBufferSize="65536"   
                                 maxConnections="10"   
                                 maxReceivedMessageSize="2147483647"
                                 >
                    <security mode="None">
                        <transport protectionLevel="None" />
                    </security>
                </binding>
            </netNamedPipeBinding>
        </bindings>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
            <baseAddressPrefixFilters>
                <add prefix="http://localhost:8733"/>
            </baseAddressPrefixFilters>
        </serviceHostingEnvironment>
    </system.serviceModel>
    <appSettings>
        <add key="countoffiles" value="7"/>
        <add key="logfilelocation" value="abc.txt"/>
    </appSettings>
</configuration>

Revised Client Side C# Code:

var callback = new IpcCallbackAppToService();
InstanceContext context = new InstanceContext(callback);
NetNamedPipeBinding binding = new NetNamedPipeBinding();
binding.Security.Mode = NetNamedPipeSecurityMode.None;
EndpointAddress endpointAddress = new EndpointAddress("net.pipe://localhost/MyIpcAppToService");
var pipeFactory = new DuplexChannelFactory<IIpcAppToService>(context, binding, endpointAddress);
Program.HostIpcAppToService = pipeFactory.CreateChannel();
Program.HostIpcAppToService.Connect();
CommAppToService.IsPipeAppToService = true;

The service throws no exceptions that I can detect, as the EventViewer is clean, just the OnStart() successfully completed message. I know that the system processes the App.config file, as previously when I had errors, the Windows Event Viewer would keep complaining, but not anymore.

Here were some of the Microsoft docs that I used:

netNamedPipeBinding

netNamedPipeBinding2

I did try IO Ninja, but specifying \\.\pipe\MyIpcToService for File Stream, Pipe Listener, and Pipe Monitor, but nothing shows there, even when I try to connect using my WinForms desktop application, which then throws the no pipe listener found exception.

What can be the problem?

解决方案

<endpoint address="net.pipe://localhost/MyIpcAppToService" binding="wsDualHttpBinding" bindingConfiguration="MyAppToServiceEndpointBinding" contract="MyIpc.IIpcAppToService"/>

Make sure that the service address is in the same form (transport protocol) as the binding type.

  • TCP(net.tcp://localhost:8000/myservice) NetTcpBinding
  • IPC(net.pipe://localhost/mypipe) NetNamedPipeBinding
  • Http/Https(http://localhost:8000/myservice)
    Wshttpbinding,Wsdualhttpbinding,basichttpbinding

  • WebSocket(ws://localhost:3434) Nethttpbinding

  • MSMQ(net.msmq://localhost/private/myservice) NetMsmqBinding

we are supposed to use NetnamedPipeBinding for the service address. Please refer to my example.


Updated
I have a wcf service using NetNamedPipeBinding hosted in IIS, wish it is useful to you.
Server(wcf service application)

    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        string GetData(int value);
}
    public class Service1 : IService1
    {
        public string GetData(int value)
        {
            return string.Format("You entered: {0}", value);
        }
}

Web.config(Server side)

<system.serviceModel>
    <services>
      <service behaviorConfiguration="BehaviorMyService" name="WcfService1.Service1">
        <endpoint address="MyIpcAppToService"
                            binding="netNamedPipeBinding"
                            bindingConfiguration="EndpointBindingMyAppToService"
                            contract="WcfService1.IService1"
                                    />
        <endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="BehaviorMyService">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <netNamedPipeBinding>
        <binding name="EndpointBindingMyAppToService"
                         closeTimeout="00:01:00"
                         openTimeout="00:01:00"
                         receiveTimeout="00:10:00"
                         sendTimeout="00:01:00"
                         transactionFlow="false"
                         transferMode="Buffered"
                         transactionProtocol="OleTransactions"
                         hostNameComparisonMode="StrongWildcard"
                         maxBufferPoolSize="524288"
                         maxConnections="10"
                         maxReceivedMessageSize="2147483647"
                                 >
          <security mode="None">
            <transport protectionLevel="None" />
          </security>
        </binding>
      </netNamedPipeBinding>
    </bindings>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
    </serviceHostingEnvironment>
  </system.serviceModel>

Enable WCF new feature.


IIS site(enable net.pipe)


Client(console application)

  ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
    var result = client.GetData(34);
    Console.WriteLine(result);

Client app.config(auto-generated)
I use the http address(service metadata GET address http://localhost:8733/Service1.svc?wsdl) to generated the configuration.

  <system.serviceModel>
        <bindings>
            <netNamedPipeBinding>
                <binding name="NetNamedPipeBinding_IService1">
                    <security mode="None" />
                </binding>
            </netNamedPipeBinding>
        </bindings>
        <client>
            <endpoint address="net.pipe://mynetpipe/Service1.svc/MyIpcAppToService"
                binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IService1"
                contract="ServiceReference1.IService1" name="NetNamedPipeBinding_IService1" />
        </client>
    </system.serviceModel>

Feel free to let me know if there is anything I can help with.

这篇关于使用 App.Config 的 Windows 服务中的 WCF 命名管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆