c# - soap client working from console app, timeout when called from within wcf service -
here deal: have class library makes calls web service via soap client. when called within console application works fine. when called within wcf service invoked http call "endpointnotfoundexception - there no endpoint listening @ http://blablabla.asmx accept message. caused incorrect address or soap action..."
both app.config , web.config contain exact same configuration client endpoint
so, whats going on? way, wcf running locally visual studio. soap web service trying call located on internet.
this how service model configuration looks like. using basic authentication , user , password being set in code in class library:
<system.servicemodel> <bindings> <basichttpbinding> <binding name="vocalserversoap"> <security mode="transportcredentialonly"> <transport clientcredentialtype="basic" /> </security> </binding> </basichttpbinding> </bindings> <client> <endpoint address="http://pseudourl.asmx" binding="basichttpbinding" bindingconfiguration="vocalserversoap" contract="vocalwebservice.vocalserversoap" name="vocalserversoap" /> </client>
ohhhh.... frustration! after thought had nailed down permissions problem (as per prior post) reverted same behavior of timing out.
eventually because of proxy.... turns out (from msdn):
applications running nt service or part of asp.net use internet explorer proxy server settings (if available) of invoking user. these settings may not available service applications.
so requests soap service invoked within wcf service did not have proxy configured @ all... hence no end point exception.
to overcome had declare manually proxy in soap client binding:
<binding name="vocalserversoap" proxyaddress="http://<your proxy address>:<proxy port>" usedefaultwebproxy="false"> <security mode="transportcredentialonly"> <transport clientcredentialtype="basic" /> </security> </binding>
so why did think permissions? how come working time time? well, fiddler had caused me real confusion.... when activating fiddler worked since outgoing requests being routed proxy correctly because fiddler using system proxy.
i can not believe wasted day of life :(
Comments
Post a Comment