static void Main(string[] args) { TrustAllCertificates(); Console.WriteLine("Enter a string to reverse, then press <ENTER>"); string userInputString = Console.ReadLine(); Console.WriteLine(); string acsEndpoint = String.Format("https://{0}.{1}/v2/wstrust/13/issuedtoken-symmetric", SamplesConfiguration.ServiceNamespace, SamplesConfiguration.AcsHostUrl); string idpEndpoint = ConfigurationManager.AppSettings.Get("IdpEndpointAddress"); ChannelFactory <IStringService> stringServiceFactory = CreateChannelFactory(acsEndpoint, idpEndpoint, ServiceAddress); IStringService stringService = stringServiceFactory.CreateChannel(); ICommunicationObject channel = (ICommunicationObject)stringService; try { string outputString = stringService.Reverse(userInputString); Console.WriteLine("Service responded with: " + outputString); Console.WriteLine(); Console.WriteLine("Press <ENTER> to exit"); Console.ReadLine(); channel.Close(); } catch (Exception e) { Console.WriteLine("Exception thrown during execution: " + e.ToString()); channel.Abort(); } }