[Mono-bugs] [Bug 476008] New: Remoting and Proxy Authentification - using IWebProxy
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Feb 15 12:38:05 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=476008
Summary: Remoting and Proxy Authentification - using IWebProxy
Classification: Mono
Product: Mono: Runtime
Version: 2.2.x
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: P5 - None
Component: remoting
AssignedTo: lluis at novell.com
ReportedBy: sebastien.lebreton at free.fr
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.6)
Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Hi
The problem related here is not a 'bug' but might be interesting to read for a
better cross-plateform programming:
With current MS implementation of HttpClientChannel class, there is no public
way to provide a IWebProxy object and because of this you can not provide proxy
authentication credentials nor a bypass list.
So a very common technique was to get the client channel from the HttpChannel,
then setting the private field _proxyObject as described in this post:
http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/01/24/6050.aspx
I know this is dirty hack, of course, but there was no proper way to make it
works.
It worked well with Mono 1.9.1. I tried today with Mono 2.2 and it fails. In
the SVN repository:
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Http/HttpClientChannel.cs?view=log
i can't see the private field related to the proxy.
Instead some proxy properties are directly declared like "credentials, domain,
password, proxyName, port" making cross plateform programming harder: we usualy
get an IWebProxy instance by calling GlobalProxySelection.Select() or
GlobalProxySelection.GetEmptyWebProxy(). And we can't properly set those fields
because the indexer only supports proxyName and port.
So we are now forced to make a 'big dirty hack' (instead of the previous 'dirty
hack'):
- are we under MS implementation? -> set _proxyObject with our IWebProxy
instance by reflexion
- are we under mono? -> what kind of IWebProxy is it? -> set multiple fields by
Reflexion
Regards
Sebastien LEBRETON
Reproducible: Always
Steps to Reproduce:
-
Actual Results:
-
Expected Results:
-
-
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list