If you have only one endpoint for one service contract, you can use the default constructor (parameterless constructor) as follows:
using (ServiceReference1.Service1Client client = new ServiceReference1.Service1Client())
{
string result = client.Hello();
}
ramankashyap
To avoid code break, I have removed the old endpoint now and using the same Mtom/Streamed binding endpoint for all my service calls. Is it fine?
.
You could use MTOM or Steamed in the binding for your endpoint, but you need to update your service reference on the client side or use svcutil command line tool to generate a new config file and import it to the client project.
Peter pi - M...
Star
12871 Points
1786 Posts
Re: How to configure default endpoint?
Mar 21, 2012 06:36 AM|LINK
If you have only one endpoint for one service contract, you can use the default constructor (parameterless constructor) as follows:
using (ServiceReference1.Service1Client client = new ServiceReference1.Service1Client()) { string result = client.Hello(); }You could use MTOM or Steamed in the binding for your endpoint, but you need to update your service reference on the client side or use svcutil command line tool to generate a new config file and import it to the client project.
Regards,
Peter
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework