Many people have a problem: they forget that they need to add a firewall rule or port preface in order to allow an external connection to the endpoint when trying to connect to a hand-held device using an operator’s Internet connection (rather than Wi-Fi). this may be completely skipped, since the blackberry is sitting next to you, and you do not think of it as an outside party.
If not, try an application hosted in WCF
You can provide your service using the WCF endpoint.
from http://msdn.microsoft.com/en-us/library/ms731758.aspx
// Host the service within this EXE console application. public static void Main() { // Create a ServiceHost for the CalculatorService type and use // the base address from config. ServiceHost hostDefault = new ServiceHost(typeof(CalculatorService)); int manualFlowControlLimit = hostDefault.ManualFlowControlLimit; basicHttpBinding portsharingBinding = new basicHttpBinding(); hostDefault.AddServiceEndpoint(typeof( CalculatorService ),portsharingBinding,"http://localhost/MyService" ); using (ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService))) { // Open the ServiceHost to start listening for messages. serviceHost.Open(); // The service can now be accessed. Console.WriteLine("The service is ready."); Console.WriteLine("Press <ENTER> to terminate service."); Console.ReadLine(); // Close the ServiceHost. serviceHost.Close(); } }
source share