Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在IIS中,在Windows 7和Windows 2008 Server下托管net.tcp wcf服务有什么不同吗?_Wcf_Iis_Windows 7_Windows Server 2008_Nettcpbinding - Fatal编程技术网

在IIS中,在Windows 7和Windows 2008 Server下托管net.tcp wcf服务有什么不同吗?

在IIS中,在Windows 7和Windows 2008 Server下托管net.tcp wcf服务有什么不同吗?,wcf,iis,windows-7,windows-server-2008,nettcpbinding,Wcf,Iis,Windows 7,Windows Server 2008,Nettcpbinding,在windows 7下,我无法使用net.tcp托管服务,但它在windows 2008 server上运行良好。我启用了WAS,并在windows 7和windows server中进行了相同的设置,但由于某些原因,它在windows 7中不起作用。我在客户端遇到的错误是: System.ServiceModel.EndpointNotFoundException: The message could not be dispatched because the service at the e

在windows 7下,我无法使用net.tcp托管服务,但它在windows 2008 server上运行良好。我启用了WAS,并在windows 7和windows server中进行了相同的设置,但由于某些原因,它在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完全相同。有什么线索吗?

我想你已经解决了,因为。。。 端口共享是否是未启用的情况?

它似乎正在工作。我现在有一台新电脑,我又试了一次,一点问题也没有。因此,在Win7上使用IIS7托管net.tcp应该可以正常工作。

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

... NetTcpPortSharing service: .
这就不知道从那里去哪里了

事实证明,Net.Tcp侦听器适配器服务指向.net3,Net.Tcp端口共享服务指向.net4

我能通过跑步很快修复它

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\ServiceModelReg.exe -r

事实上,我没有让它在我的机器上工作,我必须将它部署到测试服务器才能让它工作。而且它不是端口共享,因为我配置了它。可能是解决方案,我不再有那个服务器来验证它。那个命令行工具是什么?r做什么?您是如何发现一个服务指向3,另一个指向4的?啊,我明白了-如果您查看服务的文件路径,您可以看到一个指向v3,而另一个指向v4。我运行了命令,它修复了它。谢谢霍特曼!