在Windows 7和IIS 2008中的Windows 2008 Server下托管net.tcp wcf服务有什么区别吗?

Tom*_*son 5 iis wcf nettcpbinding windows-server-2008 windows-7

我有一种情况,我无法在Windows 7下使用net.tcp托管服务,但它在Windows 2008服务器上运行正常.我启用了WAS,并在Windows 7和Windows服务器中进行了相同的设置但由于某种原因它在Windows 7中不起作用.我在客户端获得的错误是:

System.ServiceModel.EndpointNotFoundException: The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost:908/TcpTest/MySuperService.svc' is unavailable for the protocol of the address.

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.CommunicationObject.Open()
Run Code Online (Sandbox Code Playgroud)

在事件日志中,我收到以下服务错误:

An error occurred while trying to listen for the URL '/LM/W3SVC/9/ROOT/TcpTest'. This worker process will be terminated.
 Sender Information: net.tcp
 Exception: System.ServiceModel.WasHosting.TcpAppDomainProtocolHandler/24230272
 Process Name: System.ServiceModel.CommunicationException: The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: .
   at System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.Register()
   at System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.Open(Boolean isReconnecting)
   at System.ServiceModel.Channels.SharedConnectionListener.StartListen(Boolean isReconnecting)
   at System.ServiceModel.Channels.SharedTcpTransportManager.OnOpenInternal(Int32 queueId, Guid token)
   at System.ServiceModel.Activation.HostedTcpTransportManager.Start(Int32 queueId, Guid token, Action messageReceivedCallback)
   at System.ServiceModel.WasHosting.TcpAppDomainProtocolHandler.OnStart()
   at System.ServiceModel.WasHosting.BaseAppDomainProtocolHandler.StartListenerChannel(IListenerChannelCallback listenerChannelCallback)
 Process ID: w3wp
Run Code Online (Sandbox Code Playgroud)

对于Windows 7和Windows 2008上的服务,web.config完全相同.任何线索?

hor*_*man 9

我遇到了同样的问题,异常消息以此结束

... NetTcpPortSharing service: .
Run Code Online (Sandbox Code Playgroud)

这不知道从那里去哪里.

事实证明,Net.Tcp侦听器适配器服务指向.NET 3,Net.TCP端口共享服务指向.NET 4

我能够通过运行快速修复它

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\ServiceModelReg.exe -r
Run Code Online (Sandbox Code Playgroud)


Tom*_*son 0

看起来它正在发挥作用。我现在有一台新电脑并再次尝试,完全没有问题。因此,在带有 IIS7 的 Win 7 上托管 net.tcp 应该可以正常工作。