2009-08-20 8 views
0

J'héberge un service WCF dans un service Windows hébergé.Hébergement d'un service WCF (mex endpoint) dans un service Windows sur Windows 2008

Quand je commence la WHS, je reçois l'erreur suivante:


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 

Est-ce quelque part dans Windows ou sont-ils enregistrés et non enregistrés quand je commence/arrêter le processus?

+0

Etes-vous en train d'essayer d'héberger le point de terminaison mex au même point d'accès que le point de terminaison du service? –

+0

Etes-vous absolument certain que ce problème n'a rien à voir avec votre configuration? Est-ce la raison pour laquelle vous n'avez pas publié votre configuration WCF? En outre, cela ne ressemble pas à l'exception complète. S'il vous plaît poster le tout. Peut-être attraper l'exception et afficher les résultats de ex.ToString(). –

Répondre

2

Utilisez un point d'extrémité différent pour Mex. Il a probablement besoin d'un numéro de port différent de votre port net.tcp. Si votre port net.tcp est 8000 alors essayez

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

N'oublie pas la reliure !!! binding = "mexTcpBinding" –

Questions connexes