RE: WCF Proxy Server settings not working



Hi Clint,

Based on your problem description, I understand that you're encountering a
proxy authentication issue when cosuming a remote servcie via WCF client,
correct?

I haven't researched the difference between webservice client and WCF
client yet. But based on my experience, since it works when you directly
call the "ThirdPartyResearchWrapper", but failed when you call it via
another local WCF service("Research") sevice, I think the problem is that
the "Research" service is not passing the correctly credentials for the
proxy authentication. Here is my analysis based on the topology of your
current service environment.

=============
Two approachs:

1. ClientApp----> "Research" Service (used the wrapper) ----> 3rd party
service

result: not work, proxy authentication error


2. ClientApp(directly use wrapper) ---> 3rd party service

result: works
==============

Since you've used " <defaultProxy useDefaultCredentials="true"> setting, we
know that in approach #1, it will use your application's running process
account to access the remote service(also proxy server), you can verify the
account.

In approach#2, since you access the remote 3rd party service via
intermediate "research service", therefore, the proxy authentication rely
on the security identity at "Research" service's web application context,
is it also using the same identity as the one in #1? I think this is what
you can try checking. If not, you can consider using the following means
to make the "Research" service use the specified account:

1. change the "Research" service's running process account(such as change
the IIS application pool identity)

2. You can use impersonate to programmtically make the certain
function/code running under a specify account


In addition, as you mentioned that

<<<<<<<<<<<<
I've tried hard-coding the login/password to our proxy server within
ThirdPartyResearchWrapper where it calls MarketResearch


would you show me the code you used?


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
Thread-Topic: WCF Proxy Server settings not working
thread-index: AckjRwxoXqPAeJ7JQrSAWCIvDobtGA==
From: =?Utf-8?B?Q2xpbnQ=?= <cmueller@xxxxxxxxxxxxx>
Subject: WCF Proxy Server settings not working
Date: Tue, 30 Sep 2008 14:54:01 -0700


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


.



Relevant Pages

  • RE: Soap class definition question
    ... Yes, for the "standard webservce" proxy, it hasn't provided support on ... reusing typeslike what WCF ... its autogenerated one to your shared common types. ...
    (microsoft.public.dotnet.xml)
  • RE: WCF concurrent call on client
    ... \par #A Sample for WCF Client Proxy Pooling ... \par Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Using WCF Services from 2.0 programs
    ... As for the signature of the auto-generated webservice proxy, ... in WCF use binary format by default. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Need to set username and password in web.config for ISA Proxy for WCF client
    ... And since the WCF ... service is accessed through a ISA proxy, ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: WCF Client Generation Issue
    ... \par BTW, for your further comments about the WCF document and reference resources, I agree that for some specific topcs or features, the related information is not quite sufficient and centralized that make it a bit difficult to locate. ... \par that library in the service and proxy projects). ... \par> complex type in your WCF service side, it will automatically create a proxy ... \par> The generated ListEquipmentResponse looks like ...
    (microsoft.public.dotnet.framework.webservices)

Loading