Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++Windows
There is this client/server appication that I developed. I wish to host a website for it as well as host the sever version on the same hosting location in order to save money.
 
My only concern is whether the server version of my application will conflict with the web server that will service browsers that request for web pages of my website from the same hosting location. I mean is it possible for my application to intercept connection meant for the web server and is it possible for the web sever to intercept connection request meant for my server application.
 

In short is it possible for the two server application to coexist on the same computer? If that is the case , is there any condition that must be satisfied for this to be?.
Posted 22-Sep-12 5:24am
Gbenbam770
Comments
Mohibur Rashid at 22-Sep-12 12:15pm
   
here is an idea, might be crazy, run your installed webserver on some other port, run your application on port 80, and your application will read all the request from both of your server. when the request would be for your already running server just create the same request, that came from client, to the running server and also forward all the reply from the server to client.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Yes if the communication mechanism and data storage are different i.e. you use different TCP port numbers and the database connection strings are different.
  Permalink  
Comments
Gbenbam at 22-Sep-12 15:02pm
   
Do you consider port 49222 appropriate for my purpose?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

In short, yes, for example you can run IIS and SQLServer on the same machine.
The long answers requires some more details.
 
Websites run on port 80, so IIS uses that already. Your application will need to use an unused port, somewhere high above 20k is always good, but there is a list on wikipedia with registered ports: http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers[^]
If you pick an unused port, and set the firewall correctly you can host as many applications on the same machine as you like, provided you have enough RAM and whatnot.
 
If you want to have both run port 80, then you can use IIS to make a webapplication, with a certain subdomain, and redirect that to an ASP.NET application (but that is probably not what you would want to do, if it is, let me know and I could explain more on that)
 
Hope this helped you on your way Smile | :)
  Permalink  
Comments
Gbenbam at 22-Sep-12 15:02pm
   
Do you consider port 49222 appropriate for my purpose?
Christiaan Rakowski at 22-Sep-12 15:08pm
   
Anything that high is probably unused, and thus a very good choice.

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 800
1 OriginalGriff 503
2 Abhinav S 253
3 thatraja 245
4 Emre Ataseven 200
0 Sergey Alexandrovich Kryukov 8,282
1 OriginalGriff 4,750
2 Peter Leow 3,784
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 22 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid