C
Clint
Hello,
I've been having a problem connecting to a standard ASMX file via WCF when
going through a proxy server. My setup is a little confusing, so I'll try to
explain it first before the problem ...
I have a series of services, some front-end interfaces (FE) for back-end
services (BE) that themselves may be an interface to a third party site. To
simplify, say I have three services:
1. Front-end "Research" service (WCF - SVC)
2. Back-end "ThirdPartyResearchWrapper" service (WCF - SVC)
3. Third party "MarketResearch" service (ASMX, sourced externally, not on
our intranet like (1) and (2))
Right now, Research has ThirdPartyResearchWrapper as a DLL reference.
ThirdPartyResearchWrapper has MarketResearch as a Service Reference (with all
the applicable client binding information in the Web.config file).
Now, I have a library that contains a bunch of nUnit tests. I have two tests
in particular - one that tests out ThirdPartyResearchWrapper (as a DLL
reference), and one that tests out Research as a Service Reference. I have
the following in my config files for both the test library and in Research's
web.config file:
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="False"
proxyaddress="http://[our proxy server's address]"
bypassonlocal="True" />
</defaultProxy>
</system.net>
The web site runs as a domain user that has internet access.
Now, if I run the test that goes directly to ThirdPartyResearchWrapper (via
the DLL link), my service call works just fine. If I run the test that goes
to Research (via Service Reference), I get "The remote server returned an
unexpected response: (407) Proxy Authentication Required.".
I've tried hard-coding the login/password to our proxy server within
ThirdPartyResearchWrapper where it calls MarketResearch and I've made sure
the config file is visible to ThirdPartyResearchWrapper, all with absolutely
no luck. To make matters worse, when I had MarketResearch referenced inside
ThirdPartyResearchWrapper as a Web Service Reference, everything worked fine.
I don't want to go back to this route as eventually I'll need to implement a
SOAP extension, and that's far easier via WCF than the non-WCF way.
I'd appreciate any help you can provide. I've pretty much wasted all day on
this looking for answers online, and have come up dry.
Thanks!
Clint
I've been having a problem connecting to a standard ASMX file via WCF when
going through a proxy server. My setup is a little confusing, so I'll try to
explain it first before the problem ...
I have a series of services, some front-end interfaces (FE) for back-end
services (BE) that themselves may be an interface to a third party site. To
simplify, say I have three services:
1. Front-end "Research" service (WCF - SVC)
2. Back-end "ThirdPartyResearchWrapper" service (WCF - SVC)
3. Third party "MarketResearch" service (ASMX, sourced externally, not on
our intranet like (1) and (2))
Right now, Research has ThirdPartyResearchWrapper as a DLL reference.
ThirdPartyResearchWrapper has MarketResearch as a Service Reference (with all
the applicable client binding information in the Web.config file).
Now, I have a library that contains a bunch of nUnit tests. I have two tests
in particular - one that tests out ThirdPartyResearchWrapper (as a DLL
reference), and one that tests out Research as a Service Reference. I have
the following in my config files for both the test library and in Research's
web.config file:
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="False"
proxyaddress="http://[our proxy server's address]"
bypassonlocal="True" />
</defaultProxy>
</system.net>
The web site runs as a domain user that has internet access.
Now, if I run the test that goes directly to ThirdPartyResearchWrapper (via
the DLL link), my service call works just fine. If I run the test that goes
to Research (via Service Reference), I get "The remote server returned an
unexpected response: (407) Proxy Authentication Required.".
I've tried hard-coding the login/password to our proxy server within
ThirdPartyResearchWrapper where it calls MarketResearch and I've made sure
the config file is visible to ThirdPartyResearchWrapper, all with absolutely
no luck. To make matters worse, when I had MarketResearch referenced inside
ThirdPartyResearchWrapper as a Web Service Reference, everything worked fine.
I don't want to go back to this route as eventually I'll need to implement a
SOAP extension, and that's far easier via WCF than the non-WCF way.
I'd appreciate any help you can provide. I've pretty much wasted all day on
this looking for answers online, and have come up dry.
Thanks!
Clint