5
votes

On windows mobile when there is no internet connection and I try to browse the web using internet explorer i get cannot connect information at the top of the screen. It says cannot connect with current connection settings. To change your connection settings, tap settings. And I am able to tap Settings and setup network connections. How can I display cannot connect information programmatically? When I cannot connect to a webservice using my application I would like to show the same information and let the user set up network connections. I use compact framework 2.0 and csharp.

Thanks in advance.

2
Who the heck down-voted this question? This is a completely legitimate question that I'm very interested in knowing the answer to.MusiGenesis

2 Answers

0
votes

This is not the best answer, and I hope someone has a better one, but: one thing you can do when your app is not able to reach the webservice is to use the Process class (in System.Diagnostics) to start your webservice URL in Internet Explorer (aka "shelling out").

This will cause IE to appear, and since it can't see the webservice either, it will show the Settings dialog that you need. Once you change your settings so that you can see the webservice, you just close IE and now you're back in your app (which will now be able to see the webservice).

0
votes

Enabling notifications for third party programs via

"Start > Settings > Sounds & Notifications"

might help (at least if you use the ConnectionManager, e.g. through HttpWebRequest).

Regards, tamberg