При подключении к WCF службе вылетает exception
, хотя в app.config
конфиг явно указан не 80 порт:
An unhandled exception of type 'System.ServiceModel.AddressAlreadyInUseException' occurred in System.ServiceModel.dll
Additional information: HTTP could not register URL http://+:80/Temporary_Listen_Addresses/c3e45f68-abf2-4847-95a6-cfd3f512fc54/ because TCP port 80 is being used by another application.
Самое странное, что на одном ПК вылетает exception
, а на другом нет. В чем может быть проблема?
app.config
клиента :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="wsEndpoint" />
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:50055/Service" binding="wsDualHttpBinding"
bindingConfiguration="wsEndpoint" contract="ServiceReference1.IChatServerService"
name="wsEndpoint">
</endpoint>
</client>
</system.serviceModel>
</configuration>
app.config
сервер:
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="ServiceBehaviour0" name="Services.Concrete.ChatServerService">
<endpoint address="ws" binding="wsDualHttpBinding" name="wsEndpoint"
contract="Services.Abstracts.IChatServerService" />
<endpoint address="mex" binding="mexHttpBinding" name="mexEndpoint"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:50055/Service/"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour0">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
netstat -anb > ports.txt
. В моём случае это был Skype.