Sunday, 25 August 2013

No protocol binding matches the given address' error

No protocol binding matches the given address' error

I am using Visual Studio 2008. I created a WCF application and when I ran
the service for the first time from VS IDE (not hosted on IIS), the
service opened in the web browser with the address localhost:1927/. Every
time I run this service from VS IDE, it runs in the same port, i.e 1927
I wanted to change the port number (for some reason), so I gave specific
address localhost:1928 in the web.config file. When I run the web service
in IDE after this change, I keep getting the following error.
No protocol binding matches the given address 'localhost:1928/'. Protocol
bindings are configured at the Site level in IIS or WAS configuration.
Following is the <service> section from the web.config file.
<service name="EMS.ServiceImplementation.EmployeeService"
behaviorConfiguration="EM.EmployeeServiceBehavior" >
<endpoint name="httpEndPoint"
address="http://localhost:1928/"
binding="basicHttpBinding" bindingConfiguration=""
contract="EMS.ServiceContracts.IEmployeeService" />
<endpoint name="MEXEndPoint"
address="mex"
binding="mexHttpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
</service>
My specific questions are:
How does VS IDE run the service always on the same port which it picked in
the first run? Where is this information stored? (I looked through all
files in the solution but I couldn't find port 1927 mentioned anywhere).
How can I make the service run on a different port?
(Please note that, I have seen similar threads in Stackoverflow, but they
relate to service hosted in IIS)`

No comments:

Post a Comment