473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Select network interface

Hi,

I would to know if there's a way to use a particular network interfaces to
access network(programmatically c#). The problem is that if my wireless
network card is working, I want my application to use this one to access the
network.

Thanks
Nov 17 '05 #1
2 9378
Marc,

If you are using Sockets, then you can bind to a particular IP address
(you have to figure out on your own which network adapater has which
address). However, if you don't, then it's up to the discretion of the API
provider to provide this functionality (which most don't).

You ^could^ disable the other network card, so that the winsock layer
has no choice but to go through the network adapter that you specify, but
this can have adverse effects on other programs, and is not the best of
solutions.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Marc-André" <Ma******@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
Hi,

I would to know if there's a way to use a particular network interfaces to
access network(programmatically c#). The problem is that if my wireless
network card is working, I want my application to use this one to access
the
network.

Thanks

Nov 17 '05 #2
hi,

This is a rather difficult thing to do, to your app there is no
difference between the "wired" and "wireless" interface, you would have to
query the interface and see which ( if any ) is wireless.

I think you could do something like that using WMI , but not sure about it.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Marc-André" <Ma******@discussions.microsoft.com> wrote in message
news:44**********************************@microsof t.com...
Hi,

I would to know if there's a way to use a particular network interfaces to
access network(programmatically c#). The problem is that if my wireless
network card is working, I want my application to use this one to access
the
network.

Thanks

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: K_Lee | last post by:
While trying to understand some issues to python's implementation of Socket, I recorded an outline to Python's socket object interface to the native implementation in a webblog type documents in...
1
by: Neel Word | last post by:
I need to develop an application (development platform: Win2000; target platform: Win98/ME/NT4/2000/XP), which would require file transfer functionality over dial-up and network. We could...
6
by: Paul | last post by:
Hello everyone: I am developing a VB.Net Windows Application and I am now ready to create the deployment project for it. This application needs to be installable on a different number of users...
1
by: Naveen Mukkelli | last post by:
Hi, I've got 3 Network Interface Cards(NIC) in my PC. Lets say NIC1, NIC2, NIC3. I have openend network connections in control panel and renamed them to Network 1, Network 2, Network 3. I'm...
5
by: UJ | last post by:
I had already asked how to get the network settings on the machine and was told that I should use the WMI interface. I downloaded programs that will allow me to look at the stuff but I'm not sure...
8
by: rongchaua | last post by:
Hi all, i would like now to disable and enable network adapter programmatically with c#. I have searched but found nothing useful. There's no topic about this problem. Has someone done with this...
2
by: Joshua Beall | last post by:
Hi All, I've got a utility I'm working on, and I want to be able to list for the user all the current network interfaces on the machine. Is there a way to do this in PHP? PHP 5.0.3, Mandriva...
4
by: dumbkiwi | last post by:
I have written a script that uses the urllib2 module to download web pages for parsing. If there is no network interface, urllib2 hangs for a very long time before it raises an exception. I...
0
by: nancylife | last post by:
When developing web report, many developers use VMware to simulate different operating systems on a same server. Then, they can realize cross-platform deployment and debug of web report. According to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.