SanjaySutar
asked on
how to configure different port and service URL and clientBaseAddress ?
Hi,
I have a WCF Service (using WSDualHttpBinding) hosted on a machine. I am try to consume service from a different machine.
In the app.config i have added endpoint address as http://pc1/ServiceTest/Service1.svc and clientBaseAddress as http://pc1/ServiceTest/Service1.svc
I am getting error while consuming service as metioned below :
Message: HTTP could not register URL http://+:80/ServiceTest/Service1.svc/ because TCP port 80 is being used by another application.
I have a WCF Service (using WSDualHttpBinding) hosted on a machine. I am try to consume service from a different machine.
In the app.config i have added endpoint address as http://pc1/ServiceTest/Service1.svc and clientBaseAddress as http://pc1/ServiceTest/Service1.svc
I am getting error while consuming service as metioned below :
Message: HTTP could not register URL http://+:80/ServiceTest/Service1.svc/ because TCP port 80 is being used by another application.
ASKER
Hi Unflux, thanx for the reply.
If WCF service and consuming application are on the same machine then adding port no. to clientBaseAddress is working.
But in this case my WCF service is hosted on some different machine.
So i am getting the error. Please take a look at the config file and correct me if am making any mistake.
I also tried to use different ports in service URL available on WCF service host machine, but all in vain.
If WCF service and consuming application are on the same machine then adding port no. to clientBaseAddress is working.
But in this case my WCF service is hosted on some different machine.
So i am getting the error. Please take a look at the config file and correct me if am making any mistake.
I also tried to use different ports in service URL available on WCF service host machine, but all in vain.
<bindings>
<wsDualHttpBinding>
<binding name="ServerService" closeTimeout="00:30:00"
openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" clientBaseAddress="http://pc1:1123/WSDualHttpBindingTest/Service1.svc">
<readerQuotas maxDepth="32" maxStringContentLength="131072000" maxArrayLength="16384"
maxBytesPerRead="51200" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:30:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://pc1/WSDualHttpBindingTest/Service1.svc" binding="wsDualHttpBinding"
bindingConfiguration="ServerService"
contract="ServiceReference1.ServerService" name="ServerService">
</endpoint>
</client>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have that already in config files.
Server Config
Client Config
Still I am getting error as i have mentioned earlier.
Server Config
<endpoint address="http://localhost:2660/Service1.svc" binding="wsDualHttpBinding" contract="WSDualHttpBindingTest.IServerService" />
Client Config
<client>
<endpoint address="http://localhost:2660/Service1.svc" />
<bindings>
<wsDualHttpBinding>
<binding name="ServerService" clientBaseAddress="http://localhost:8080/Service1.svc" />
Still I am getting error as i have mentioned earlier.
To resolve this error simply specify a port number within your base address, for example:
Open in new window