我有一种情况,我无法在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()
在事件日志中,我收到以下服务错误:
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
对于Windows 7和Windows 2008上的服务,web.config完全相同 . 任何线索?
3 回答
我遇到了同样的问题,异常消息以此结束
这不知道从那里去哪里 .
事实证明,Net.Tcp侦听器适配器服务指向.NET 3,Net.TCP端口共享服务指向.NET 4
我能够通过运行快速修复它
我猜你已经解决了,因为...端口共享的情况是不是已启用? http://msdn.microsoft.com/en-us/library/aa395195.aspx
好像它正在发挥作用 . 我现在有了一台新电脑并再次尝试,没有任何问题 . 因此,使用IIS7在Win 7上托管net.tcp应该可以正常工作 .