Rick.H

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



Re: Smart Devices VB and C# Projects How to Get Proxy Address on WinCE(C#)

Rick.H

any one can help me



Re: Smart Devices VB and C# Projects How to Get Proxy Address on WinCE(C#)

Zero Dai - MSFT

Dear rick,

WebProxy.GetDefaultProxy() method has been obsolete since .NET Compact Framework. And it will not gain the value we expected. Instead, it's recommended to use GlobalProxySelection Class with its Select method.

Similar topics can be found when you search the key word in our forum, following may help you:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=688350&SiteID=1

Regards,

Zero Dai - MSFT