2009-08-20 160 views
0

我在Windows托管服务中托管WCF服务。在Windows 2008的Windows服务中托管WCF(mex endpoint)服务

当我开始WHS的,我得到以下错误:


The ChannelDispatcher at 'net.tcp://mysecreturl/' with contract(s) '"IClass"' is unable to open its IChannelListener. 

System.InvalidOperationException: A registration already exists for URI 'net.tcp://mysecreturl/Indexer/'. 
    at System.ServiceModel.Channels.UriPrefixTable`1.RegisterUri(Uri uri, HostNameComparisonMode hostNameComparisonMode, TItem item) 
    at System.ServiceModel.Channels.ConnectionOrientedTransportManager`1.Register(TransportChannelListener channelListener) 
    at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener) 
    at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback) 
    at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout) 
    at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) 

    at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) 
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
    at VBoD.Search.WindowsServiceHost.WindowsServiceHost.OnStart(String[] args) in D:\......:line 29 

System.ServiceModel 

难道这些地方在Windows或者是他们注册与未注册的时候我开始/停止的过程?

+0

您是否尝试在与服务端点相同的uri上托管mex端点? – 2009-08-20 00:55:45

+0

您是否完全确定此问题与您的配置无关?这就是为什么你没有发布你的WCF配置?此外,这看起来不像完整的例外。请发布整个事情。也许赶上例外并发布ex.ToString()的结果。 – 2009-08-20 00:59:39

回答

2

为Mex使用diffeent端点。它可能需要一个与你的net.tcp端口不同的端口号。如果您的net.tcp端口是8000,那么请尝试

<endpoint address="net.tcp://mysecreturl:8001/Mex" 
      contract="IMetadataExchange" /> 
+0

不要忘记绑定!结合= “mexTcpBinding” – 2009-08-20 05:10:53

相关问题