Programmatic selection of internet connection settings

  • Thread starter Thread starter Mark Ryall
  • Start date Start date
M

Mark Ryall

Any attempt to access a network resource using any of the System.Net
classes automatically uses the current settings as specified in
Settings > Connections (such as modem/GPRS/local network,http
proxy,dns etc.).

Is there any way to either programmatically modify these connection
settings?

Is it at least possible to be able to alter which one is used by
default (modifying a reg key or something)?

Apart from trying to make a connection to some network host, is there
any way to programmatically trigger a 'connect' to whichever is set up
as the default?
 
You'll have to P/Invoke either directly to the RAS api or to the Connection
Manager API in order to do what you want.

The Http client on the Compact Framework automatically triggers an
appropriate connection (using the Connection Manager API) before making a
request.

Mike Boilen
Developer
.NET Compact Framework

This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.gotdotnet.com/team/netcf/FAQ.aspx

--------------------
| From: (e-mail address removed) (Mark Ryall)
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Subject: Programmatic selection of internet connection settings
| Date: 22 Sep 2003 05:11:27 -0700
| Organization: http://groups.google.com/
| Lines: 14
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 144.132.36.9
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1064232688 23646 127.0.0.1 (22 Sep 2003
12:11:28 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: 22 Sep 2003 12:11:28 GMT
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone.bc.net!sjc70.we
busenet.com!news.webusenet.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!p
ostnews1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:34078
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Any attempt to access a network resource using any of the System.Net
| classes automatically uses the current settings as specified in
| Settings > Connections (such as modem/GPRS/local network,http
| proxy,dns etc.).
|
| Is there any way to either programmatically modify these connection
| settings?
|
| Is it at least possible to be able to alter which one is used by
| default (modifying a reg key or something)?
|
| Apart from trying to make a connection to some network host, is there
| any way to programmatically trigger a 'connect' to whichever is set up
| as the default?
|
 
Back
Top