Click here to Skip to main content
15,884,810 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
The current application that I'm working on is a Client - Server C# application and work very well on a network.
Now I'm thinking if it can run over the internet. The question is how to do this? How can I start the Server on my computer and in what circumstances so that every Client over the internet to connect to? What software I need to do this?

Give me example or Tutorials ...

Thanks.
Posted
Comments
Herman<T>.Instance 4-Dec-12 15:27pm    
as long as the client knows where the server can be found...
TRK3 4-Dec-12 15:43pm    
And there are no firewall / router restrictions...

If the transport mechanism is http and the server has a fixed IP address that is known or discoverable (via DNS or...) then it should just work.

If the transport mechanism isn't http, then the odds are that you'll have to configure firewalls and gateways so that the communication can get through -- typically gateways are configured to allow http traffic on the default http port, but most other ports and protocols are blocked by default.

Other than that, the only other thing you need to worry about is increased latency and reduced bandwidth (if those are factors).
Herman<T>.Instance 5-Dec-12 3:56am    
that is why I used the words CAN BE!
pablo ramos1 7-Dec-12 5:33am    
Thank you digimanus & TRK3 for your responses, can you give me an illustration to understand well the problem, i don't have a fixed ip, my ip is dunamic change whenever i turn on my box(modem),the mechanism is not HTTP so how can i configure the firewall and the gatways ??!
pablo from italy

Use WCF webservices !
Build a web project using wcf!
To test it on local, host it in IIS

when it is done, go in your client side, add serviceReferences, enter the url of the service (it should looks like http://localhost/..../myservice.svc) and it will build the proxy class.
In your code, use it like this
using(MyServiceClient service = new MyServiceClient() )
{
     //service.mymethod();
}


And when your server is deployed on internet, use the same pattern with the new url!
In your web.config, change to this
XML
<servicedebug includeexceptiondetailinfaults="false" />
<directorybrowse enabled="false" />

so your work won't be use by someone else !

Client side:

#if DEBUG
using(MyDebugServiceClient service = new MyDebugServiceClient () )
#else
using(MyProdServiceClient service = new MyProdServiceClient () )
#endif
{
     //service.mymethod();
}


if your server has an entity model, don't use wcf sevices, but use wcf dataservices.
Enjoy !
 
Share this answer
 
Thank you digimanus & TRK3 for your responses, can you give me an illustration to understand well the problem, i don't have a fixed ip, my ip is dunamic change whenever i turn on my box(modem),the mechanism is not HTTP so how can i configure the firewall and the gatways ??! pablo from italy
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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