hi,
please could anyone provide the correct answer for the question.
If "IService1" is a contract,
public interface IService1
{
[operationContract]
string GetData(int value);
} then at the client side followoing is the piece of code to obtin the proxyObject, to call the service .
string url = "htt://localhost:26800/service1.svc?wsdl";
EndPointAddress endPoint = new EndPointAddress (url);
BasicHttpBinding binding = new BasicHttpBinding();
----------------------------------------------------------------------------------
Console.WriteLine (ref, GetData(100)) ;
Options :
1. IService1 lref = new ChannelFactory (endPoint), CreateChannel();
2. IService1 lref = new ChannelFactory (binding, endPoint), CreateChannel();
3. IService1 lref = new ChannelFactory (binding), CreateChannel();
4. IService1 lref = new ChannelFactory (), CreateChannel();

Akash VarshneyRank #1,895 · 780 reputationPosted Sep 6, 2016, 4:03 AM EDT
Akash VarshneyRank #1,895 · 780 reputationPosted Sep 1, 2016, 9:24 PM EDT
ketan borsdiyaRank #2,258 · 624 reputationPosted Sep 1, 2016, 9:45 PM EDT
anil kumar25 reputationPosted Sep 2, 2016, 7:09 AM EDT
anil kumar25 reputationPosted Sep 8, 2016, 8:56 AM EDT