New channelfactory <iadohelper> (""); this method is passed in the unit test, but the error "configuration section not found" is reported in the stress test.
Use new channelfactory <iadohelper> (bind, address); this method will not report an error.
Clientsection client = configurationmanager. getsection ("system. servicemodel/client") as clientsection;
Foreach (channelendpointelement El in client. endpoints ){
If (string. Equals (El. Name, "adoservice ")){
Endpointaddress address = new endpointaddress (El. Address );
Nettcpbinding bind = new nettcpbinding ();
Bindingssection binds = configurationmanager. getsection ("system. servicemodel/bindings") as bindingssection;
Foreach (nettcpbindingelement emelent in binds. nettcpbinding. configuredbindings ){
If (string. Equals (emelent. Name, El. bindingconfiguration )){
Emelent. applyconfiguration (BIND );
}
}
_ Channelfactory = new channelfactory <iadohelper> (bind, address );
_ Channelfactory. open ();
}
}
This approach is not feasible yet.
Which of the following gives you some advice on this situation.