Publish your web application with WCF service (.svc), and for consume the service Methods in your cs file, create a Method for get the Client of service -
public static ServiceClient GetServiceInstance()
{
System.ServiceModel.BasicHttpBinding binding = new BasicHttpBinding(
Application.Current.Host.Source.Scheme.Equals("https", StringComparison.InvariantCultureIgnoreCase)
? BasicHttpSecurityMode.Transport : BasicHttpSecurityMode.None);
binding.MaxReceivedMessageSize = int.MaxValue;
binding.MaxBufferSize = int.MaxValue;
binding.CloseTimeout = new TimeSpan(0, 10, 00);
binding.OpenTimeout = new TimeSpan(0, 10, 00);
binding.ReceiveTimeout = new TimeSpan(0, 10, 00);
binding.SendTimeout = new TimeSpan(0, 10, 00);
binding.TransferMode = TransferMode.StreamedResponse;
return new ServiceClient(binding, new EndpointAddress(
new Uri(Application.Current.Host.Source, "../Service.svc")));
}
and then
ServiceClient clinet = GetServiceInstance();
client.YourMethodName(.............
Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator