Groups | Blog | Home
all groups > dotnet compact framework > march 2008 >

dotnet compact framework : PPC 2003 web service proxy settings


davebythesea
3/28/2008 10:06:01 AM
Hi,

I have built an app in PPC 2003. It uses a web service to transfer data to
and forth. Sometimes the device is cradled via active sync and I can access
the web service via a proxy server. At other times I use the web service over
GPRS and no proxy settings are required to use the web service.

My question is - how can I determine when I should use the Proxy settings or
not?

Is there a way to determine if a device is using GPRS and to ignore the
Proxy settings?

Further, if a device is cradled at a different location which requires
different proxy settings how can these be past to the web service
automatically?

The first time I launch Internet Explorer from the PDA when it is cradled it
automatically asks for Proxy Settings. Are these cached locally on a device
somewhere ?

thanks for any tips

Simon Hart [MVP]
3/30/2008 12:31:02 PM
The easiest solution is to check if you are connected via ActiveSync, on PPC
2003 you can try to resolve ppp_peer. If this succeeds then you're connected,
otherwise assume GPRS, in this case use connection manager or try to ping a
known server.

There is no way of assuming whether a proxy server is required or not, this
is business level design - at least, that I know of.

Don't understand what you mean by this comment:
[quoted text, click to view]

The only way this can be done "automagically" is to add proxy settings to
the connection profile so when connection manager connects it uses these
proxy settings, so maybe a separate connection profile would be needed for
site X... you can set these proxy settings using the CSP (configuration
server providers).
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


[quoted text, click to view]
davebythesea
3/31/2008 2:23:02 AM
Hi Simon,

Thanks for your reply. Yes I agree it is impossible to determine the Proxy
settings for other networks and use these magically within the app. Like you
say it is a business level design if other Proxy settings are to be used and
included. Right now I have included the ability to use one proxy and to turn
it on or off. The main reason is that where the app is being developed uses a
Proxy server and I've had to configure the app for this. But is likely that
the app will not use a Proxy server when in use, but not guaranteed I guess?
And if they use the app in locations that require different proxy's well...!!
One proxy, with the ability to turn on or off, I will stick with that for the
moment.

Cheers!
Dav

[quoted text, click to view]
AddThis Social Bookmark Button