changing WCF endpoint does not persist data.
- by Vinay Pandey
Hi All,
I have an application that has reference of a WCF service on machine A, now on certain situation I want tu use similar service hosted on machine B.
When I changed the endpoint using following:-
EndpointAddress endpoint = new EndpointAddress(new Uri(ConfigurationManager.AppSettings["ServiceURLForMachineB"]));
BasicHttpBinding binding = new BasicHttpBinding();
binding.SendTimeout = TimeSpan.FromMinutes(1);
binding.OpenTimeout = TimeSpan.FromMinutes(1);
binding.CloseTimeout = TimeSpan.FromMinutes(1);
binding.ReceiveTimeout = TimeSpan.FromMinutes(10);
binding.AllowCookies = false;
binding.BypassProxyOnLocal = false;
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.MessageEncoding = WSMessageEncoding.Mtom;
binding.TextEncoding = System.Text.Encoding.UTF8;
binding.TransferMode = TransferMode.Buffered;
binding.UseDefaultWebProxy = true;
repositoryService = new WorkflowRepositoryServiceClient(binding, endpoint);
When I call login method although method is called from machine B, but username and password in Login(string username,string password) are coming null on machine B.
Any Idea what I am doing wrong here?