wcf AddressAlreadyInUseException
Ich schon gesehen, die entsprechenden Beiträge:
wcf-System.ServiceModel.AddressAlreadyInUseException,
Windows-gehosteten WCF-Dienst über HTTPS,
Immer AddressAlreadyInUseException nach der Aktualisierung auf .NET 4.5,
keiner von Ihnen mein problem zu lösen.
Ich habe mehrere wcf-Dienste in .net 4.5. Sie alle sind auf die gleiche Adresse im bekommen diese Ausnahme in der WCF-Dienst hosten:
System.ServiceModel.AddressAlreadyInUseException: HTTP could not register URL https://+:443/mafawcf01/ServicioAddin.svc/because TCP port 443 is being used by another application. ---> System.Net.HttpListenerException: The process cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
at System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.DatagramChannelDemuxer`2.OnOuterListenerOpen(ChannelDemuxerFilter filter, IChannelListener listener, TimeSpan timeout)
at System.ServiceModel.Channels.SingletonChannelListener`3.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityListenerSettingsLifetimeManager.Open(TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(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 System.ServiceModel.Security.SecuritySessionSecurityTokenAuthenticator.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityUtils.OpenTokenAuthenticatorIfRequired(SecurityTokenAuthenticator tokenAuthenticator, TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionServerSettings.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityListenerSettingsLifetimeManager.Open(TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.DelegatingChannelListener`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(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 Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)
System.Net.HttpListenerException (0x80004005): The process cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
Heres meine app.congif:
<host>
<baseAddresses>
<add baseAddress="https://localhost:443/mafawcf01/ServicioAddin.svc"/>
</baseAddresses>
</host>
</service>
<service name="mafawcf01.ServicioPing" behaviorConfiguration="mafawcf01.ServicioPingBehavior">
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="secureHttpBinding"
contract="mafawcf01.IServicioPing">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:443/mafawcf01/ServicioPing.svc" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="mafawcf01.Service1Behavior" name="mafawcf01.ServicioCargue">
<endpoint address="https://localhost:443/MafaWCF01/ServicioCargue.svc"
binding="customBinding" bindingConfiguration="myCustomHttpBinding"
contract="mafawcf01.IServicioCargue" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:443/MafaWCF01/ServicioCargue/" />
</baseAddresses>
</host>
</service>
<service behaviorConfiguration="mafawcf01.Service1Behavior" name="mafawcf01.ServicioValidacionMultiple">
<endpoint address="https://localhost:443/MafaWCF01/ServicioValidacionMultiple.svc"
binding="customBinding" bindingConfiguration="transporteSeguro"
contract="mafawcf01.IServicioValidacionMultiple" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:443/MafaWCF01/ServicioValidacionMultiple/" />
</baseAddresses>
</host>
Ich habe schon ein port reserviert mit diesem comand:
netsh http add urlacl url=https://+:443/MafaWCF01
Und auch ein Zertifikat verknüpft den Hafen:
netsh http add sslcert ipport=0.0.0.0:443 certhash={some cert hash} appid={some appid}
benötigen Sie weitere Informationen?
- Werfen Sie einen Blick mit TCPView um zu sehen, ob es etwas gibt, was bereits auf diesem port.
- Hab ich bereits gemacht, sah nichts, mit 443 in den Lokalen Hafen.
- Sollte nicht
<add baseAddress="https://localhost:443/mafawcf01/ServicioAddin.svc"/>
werden<add baseAddress="https://localhost:443/mafawcf01/" /> instead? (Note the removal of the .svc file in the base address). You may have a similar problem with
ServicioPing`. Auch, wenn Sie das hosting in IIS, die Sie nicht brauchen, um geben Sie die Basisadresse, die Lage der .svc-Datei für den Dienst. - posten Sie Ihre
customBinding
Abschnitt ?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Habe ich festgestellt, dass eine WCF-Anwendung (oder eher
http.sys
) festhalten kann, eine URL für ein wenig Zeit, nachdem es geschlossen wurde. Wenn Sie versuchen, starten Sie es sofort, können Sie die gefürchteteAddressAlreadyInUseException
da die Vorherige Instanz der Anwendung ist irgendwie halten. Ich fand, dass wenn ich ein paar Minuten warten und erneut versuchen es funktionieren kann.In diesem Fall hilft niemandem. Ich hatte das gleiche problem beim hosten eines wcf-Diensts in der Konsole-Anwendung. Was ich Tat, war die open-Eigenschaft des wcf service library (Alt + Enter oder Rechte Maustaste->Eigenschaft) und gehen Sie dann zu WCF Registerkarte Optionen im Fenster Eigenschaften, und deaktivieren Sie "Start WCF Service Host beim Debuggen ein anderes Projekt in der gleichen Projektmappe". Dann ist das problem behoben.
Ich hatte das gleiche problem.
konnte nicht finden, oder eine andere app hören auf das port, hat nicht jeder Konflikt auch immer noch diese Fehlermeldung nicht verlassen.
es geschah direkt, nachdem der Dienst abgestürzt ist, und seit dann ich konnte nicht bringen Sie wieder auf.
wie auch immer, nach PC-Neustart hat alles geklappt. tja..