hi there,
i found the public method WebProxy.GetProxy(Uri) can return the proxied URI for a request. YES, it exactly performed well on windows xp sp2 when i changed for different proxies in IE.
i noticed this method is also supported by .net compact framework. then i tried it on Windows CE 6.0(Device Emulator), but it didnt work whatever proxies i set.
there's one concern is the project i created in VS2005 is for WINCE5.0. that means i created a WINCE5.0 application, and then i tried to run on Windows Embeded CE 6.0. may this be the root cause of the application failure although i dont think so.
additional info: IE on windows XP SP2 is IE7, while in my WINCE6.0 OS, CE IE6.0 is the case.
alternative, is there any other method can be used to get proxy URI for different destination(request) URL
thanks in advance!
sample code:
public static void CheckProxyForRequest(Uri resource)
{
WebProxy proxy = (WebProxy)WebProxy.GetDefaultProxy();
Uri proxyUri = proxy.GetProxy(resource);
if(proxyUri == resource)
{
Console.WriteLine("No proxy for {0}", resource);
}
else
{
Console.WriteLine("Proxy for {0} is {1}", resource, proxyUri.ToString());
}
}
-rick