vb.net programmer and I am curious to know if there is a method to use so any program i am developing can select a specific network. I am asking this because i recently noticed that while on the wifi, i was still able to access a mapped drive from the lan connection. if there are any resources out there to enlighten me, im all ears because its annoying to constantly switch to my lan connection every time i have to test or deal with a db issue. Additional information: my programs connect to microsoft sql servers on the lan network.
Asked
Active
Viewed 696 times
0
-
take a look here, perhaps will help you : http://stackoverflow.com/questions/5325627/how-can-i-check-for-3g-wifi-edge-cellular-networks-in-windows-phone-7 – Mimouni Oct 09 '15 at 16:32
-
See if this post is the answer to your doubt: http://stackoverflow.com/questions/4547032/choose-one-of-many-internet-connections-for-an-application – David BS Oct 09 '15 at 16:37
-
@DavidBS your answer is the closest to what im looking for. the only ting i dont understand is, after calling tcpClient.Connect("stackoverflow.com", 80); where in my application code do i specify to use that connection? – Ken_S Oct 09 '15 at 22:27
-
@Ken_S, you hadn´t specified which kind the activities you need, but just how to choose different connections. WHat exactly you want to do? – David BS Oct 10 '15 at 01:30
-
well i want the program im building to always connect to an sql server on the lan connection while i am connected to both the lan and wifi. – Ken_S Oct 12 '15 at 03:28
1 Answers
0
Well I think I found an answer to my question, though it does not have anything to do with vb code. Since I am only dealing with two connections: my departments wifi and may workplace's main network(lan) , I decided to change the metric value of the lan connection to 9999 and left the wifi as automatic. somehow Im able to keep both connections open and my program connects normally to the mssql sever on the lan while im able to use my department's wifi for testing and browsing. interesting stuff there. thanks for the interesting links though.

Ken_S
- 9
- 1
- 4