我正在运行一个Windows服务,我通过NetNamedPipeBinding发送消息.消息从客户端应用程序发送,该应用程序由GPO触发.我刚刚在新服务器上安装了服务和客户端,我收到以下消息:
System.ServiceModel.EndpointNotFoundException:
There was no endpoint listening at
net.pipe://localhost/VOXAServices/VOXADefaultPipe that could accept the
message. This is often caused by an incorrect address or SOAP action.
See InnerException, if present, for more details.
Run Code Online (Sandbox Code Playgroud)
没有内在的例外.如果我通过双击桌面上的图标运行客户端应用程序,它运行没有问题.我管理Windows服务和客户端应用程序的代码,所以我可以改变我需要的任何东西.但到目前为止,我非常确信绑定,合同和地址都是正确的(因为从桌面运行时一切运行正常).我认为问题必须是从GPO运行客户端应用程序.但我想不出有什么理由会导致这个错误.
更新:
我在微软的网站上看到了这个:
命名管道是Windows操作系统内核中的对象,例如进程可用于通信的共享内存部分.命名管道具有名称,可用于单台机器上的进程之间的单向或双工通信.
当在一台计算机上的不同WCF应用程序之间需要通信,并且您希望阻止来自另一台计算机的任何通信时,请使用命名管道传输.另一个限制是,从Windows远程桌面运行的进程可能被限制为同一个Windows远程桌面会话,除非它们具有提升的权限.
(选择运输,增加重点)
我需要客户端进程在(非特权)用户的上下文中运行,并且弹出UAC对话框不是一个选项.无论如何,我是否允许此客户端进程提升特权,同时保持进程在用户上下文中运行而不是使用户具有特权?
更新#2:
似乎存在全局和本地(对于Windows会话)命名管道这样的事情.我相信我的Windows服务正在创建一个本地命名管道,如果我可以强制它创建一个全局命名管道,它将解决我的问题.(这解释了为什么我在sysinternals"Process Explorer"中看不到我的管道,即使我的客户端应用程序可以找到它,如果我从特权会话启动它).问题是,我不知道(并且似乎无法找到)如何强制全局创建命名管道(c#).有任何想法吗?
我的wcf服务中有以下配置
<endpoint address="" binding="netNamedPipeBinding"
contract="WcfWithNamedPipe.IService1"
bindingConfiguration="WcfWithNamedPipe.netNamedPipeBinding">
</endpoint>
Run Code Online (Sandbox Code Playgroud)
任何人都可以建议我如何使用netNamedPipe绑定在iis中托管这个wcf服务?
我试图在Vista计算机上的Web应用程序中使用netNamedPipeBinding来托管WCF服务.
我启用了非HTTP服务激活,如本文所述:http://msdn.microsoft.com/en-us/library/ms731053.aspx
我按如下方式配置了服务:
<endpoint address="net.pipe://myservice"
binding="netNamedPipeBinding"
bindingConfiguration="MyService_NamedPipeBindingConfig"
contract="ICMyService" />
<netNamedPipeBinding>
<binding name="MyService_NamedPipeBindingConfig"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None">
<transport protectionLevel="None" />
</security>
</binding>
</netNamedPipeBinding>
Run Code Online (Sandbox Code Playgroud)
当我浏览到.svc文件(在IIS上,而不是Visual Studio webserver)时,我收到以下消息:
[InvalidOperationException: The protocol 'net.pipe' is not supported.]
System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetConfiguration(String scheme) +11461251
System.ServiceModel.Channels.TransportChannelListener.OnOpening() +84
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +229
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +72
[InvalidOperationException: The ChannelDispatcher at 'net.pipe://myservice' with contract(s) '"IMyService"' is unable to open its IChannelListener.]
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +118
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +107
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479
[ServiceActivationException: The …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在网站中使用WCF命名管道,并且它失败并出现错误:
没有端点监听net.pipe:// localhost/mypipename可以接受该消息.这通常是由错误的地址或SOAP操作引起的.有关更多详细信息,请参阅InnerException(如果存在).
和InnerException:
The pipe name could not be obtained for net.pipe://localhost/mypipename.
Run Code Online (Sandbox Code Playgroud)
并且有另一个内部异常给出access denied
消息.
我的网站正在使用模拟,并环顾互联网,这似乎是相关的,但我不知道如何解决它.
有没有人有任何想法?
谢谢马特
我试图在Windows服务中托管WCF net.pipe服务.我在Windows服务的OnStart()
函数中用代码定义服务.我也以类似的方式创建客户端 - 代码.
我已经看到了这个问题,但它似乎总是专门用于在app/web.config文件中定义NetNamedPipe的情况.
尝试调用该服务时,我收到错误:
System.ServiceModel.ProtocolException: The requested upgrade is not supported by 'net.pipe://localhost/manager'. This could be due to mismatched bindings (for example security enabled on the client and not on the server).
Server stack trace:
at System.ServiceModel.Channels.ConnectionUpgradeHelper.DecodeFramingFault(ClientFramingDecoder decoder, IConnection connection, Uri via, String contentType, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, …
Run Code Online (Sandbox Code Playgroud) 我有很多WCF服务,我需要从另一个服务中调用一个服务.我决定netNamedPipeBinding
为此目的使用.
我的web.config文件看起来像这样.(我没有在这里复制不相关的东西.)
<services>
<service name="Services.AuthorizationService" >
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" >
<endpoint
name="AuthorizationService"
address=""
binding="basicHttpBinding" contract="ServiceContracts.IAuthorizationService" />
<endpoint address="net.pipe://localhost/TestSite/AuthorizationService.svc"
binding="netNamedPipeBinding" contract="ServiceContracts.IAuthorizationService"
name="AuthorizationNamedPipeEndpoint"/>
</service>
</Services>
Run Code Online (Sandbox Code Playgroud)
web.config文件中的客户端部分如下所示:
<client>
<endpoint address="net.pipe://localhost/TestSite/AuthorizationService.svc"
binding="netNamedPipeBinding" contract="ServiceContracts.IAuthorizationService" name="AuthorizationServiceNamedPipe" />
</client>
Run Code Online (Sandbox Code Playgroud)
我试图OperationContract
像这样调用其中一个(GetDetails):
using (ChannelFactory<IAuthorizationService> authorizationChannel = new ChannelFactory<IAuthorizationService>("AuthorizationServiceNamedPipe"))
{
IAuthorizationService authorizationService = authorizationChannel.CreateChannel();
var response = authorizationService.GetDetails(new GetDetailsRequestMessage());
}
Run Code Online (Sandbox Code Playgroud)
当我执行此代码时,我在调用OperationContract GetDetails的行中得到异常:
在net.pipe://localhost/TestSite/AuthorizationService.svc上没有可以接受该消息的端点.这通常是由错误的地址或SOAP操作引起的.有关更多详细信息,请参阅InnerException(如果存在).
我无法找出确切的问题.也没有InnerException.我使用的是Windows7机器,IIS版本是IIS7.5.请注意,我可以从我的Winform应用程序中调用此服务,没有任何问题.net.pipe绑定添加到IIS中的网站绑定.
如何使用net.pipe传输确保服务正常工作?在HTTP的情况下,我们可以在IE中浏览并确保它.
我有一个客户端应用程序,使用net.pipe协议托管WCF服务.客户端无法与在admin用户下运行的其他WCF服务进行通信.
我已经读过你不能在不同用户之间使用net.pipe进行通信.
有没有办法通过它?
我们正在构建一个启动/停止其他进程的窗口服务,UI和服务之间的通信是使用NetNamedPipe.
每个进程都有一个可以获得关闭调用的主机(仍然使用NetNamedPipe以避免端口交叉).
我在我的计算机上使用它,当我将它移动到服务器时它不起作用(NetNamedPipe不适用于跨网络 - 现在我知道).
有没有办法做到这一点?