I have a WCF service which is being called inside an assembly. Coz of this I am unable to use the configuration file of the WCF...
How can I load the configuration as XML Fragment and set properties for the Bindings and Endpoints?
I am reluctant to go and edit the Host config of the DLL or declaratively set it via the Class.
class MyClassLibrary
{
void CallWCF()
{
ServiceClient svc=new ServiceClient();
// ideally want to do this
ServiceClient svc=new ServiceClient();
svc.SetPropertieFromXmlFrag(xmlFrag);
}
}
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
&
View Complete Post