Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

Trying to get 2 webservices on same port. Is this possible? they don't have to run on the same time. Just want both on same port than I don't have to change the code evrytime. Anyone knows if it is possible because IIS is now complaining about port in use for another webservice.
Posted
Comments
F-ES Sitecore 13-Oct-15 4:21am    
What code don't you want to change? The client or the server? You can get two services on the same port if the services are hosted by IIS and you use different hostnames, so service1.yourdomain.com and service2.yourdomain.com can both be bound to the same port.
Wessel Beulink 13-Oct-15 4:33am    
Well thats the idee. But thats not working out because my IIS is configered that port for the first webservice. But keeps telling me:

---------------------------
Microsoft Visual Studio Express 2013 for Web
---------------------------
The URL 'http://localhost:55555/' is mapped to a different folder 'D:\Develop\mavis610\MavisAPI'. Would you like to remap this URL to point to this Web project's folder?


1 solution

You can run as many services as you want on the same port.

You will only get the port error if you have two web servers running on the same port (say IIS and Visual Studio express or IIS and tomcat).
So if you run one service on IIS and then try to run another service hosted on another server on the same port, you will get this error.
 
Share this answer
 
Comments
F-ES Sitecore 13-Oct-15 4:22am    
"You can run as many services as you want on the same port"

Only one will receive the requests though, you can't get two process both listening to the same port and both receiving the data.
Wessel Beulink 13-Oct-15 4:39am    
my project url is on port: 3336
I want both projects on port: 55555

Currently I Override the application root on port: 55555 but main dir. is still on 3336 how do I change this without the mapping conflict?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900