|
I don't know of an application that will do this either. Simply because applications don't give a damn which network their on. It's just not in an applications domain to care which devices carries its communications. Remember the OSI model? It's there for a reason and applications sit at the top of it, not down near the Network layer.
Like Heath said, about the only thing you can do is modify the route table based on the destination IP's that your apps are trying to connecting to.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I thought we could do this.
So, which layers take care about the fact that an applications is forced to use a modem or another?
There is no spoon.
|
|
|
|
|
bouli wrote:
So, which layers take care about the fact that an applications is forced to use a modem or another?
None. The layers are completely seperate and independent from each other. The Application Layer doesn't have any connections to the Network Layer. It still has to go through Presentation, Session, and Transport. Each layer insulates the layers ajoining it. Don't sleep throught the OSI model next time...it comes in real handy understanding modern networking.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Heath Stewart wrote:
Managed applications aren't the solution to everything, especially low-level APIs.
Not to go off on a tangent, but I wanted to say "exactly" to your argument. This is why debates about C/C++/ASM dying to managed code are just pointless. Managed code is great for high level RAD, but quite poor when it comes to dealing with low level code. That may change somewhat when WinFX, which is non-reliant on Win32, rolls around. But even then it'll be a matter of using the right tool for the job, and currently, managed code is not the right tool for low level API solutions.
#include "witty_sig.h"
|
|
|
|
|
To do this by applicaiton, the application has to be "aware" of the different network interfaces. As is applications like IE and MSN Messenger frankly don't know and don't care as long as the routing can contact the servers it seeks to query. For some applications, mostly server programs like IIS, this makes sense since they "bind" to specific interfaces so they provide tools to handle this. For client software this is behavior is almost meaningless.
I would say its nearly impossible to manipulate the routing to be application aware (I don't want to say it is impossible but it should be darn near impossible since it would be easy to write malicous software if you could just hijack traffic out of process). There is probably a way but it involves some serious win32 mojo to recognize what application is opening what socket and then altering the communication path accordingly.
I believe this is a case where someone is trying to solve something with software but ignoring the obvious (and distrubingly easy) hardware solution: take a modem off of the machine and place it on another and run your applications as applicable.
|
|
|
|
|
lol...
Maybe Bill can handle this, because he has the sources of Windows...
That could be a nice extension to Longhorn Server
There is no spoon.
|
|
|
|
|
But why would you want to? Routing is a software abstraction that is there for a reason: without routing every application that wants to make a socket connection on the internet would have to enumerate and judge for themselves what network interface to use.
The cost of adding a feature like this outweighs the actual benifit. Applications need to get simpler not more complex. Adding something to Longhorn to individually route each and every process would be a control nightmare.
Your problem would be solved in half an hour by moving one modem to another machine and running the applications seperately.
|
|
|
|
|
bouli wrote:
That could be a nice extension to Longhorn Server
and an absolute bastard to troubleshoot and administer...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
of course!!! they are here for that!!!
that could be useful for companies that have several network connections. "Bridging" is a first step... next step should be to make the applications aware of the connection to use!
There is no spoon.
|
|
|
|
|
I want to know how I can set my machines IP address in c# coding?;)
Sweet
|
|
|
|
|
There's nothing in the .NET FCL that allows you to set your machine's IP address. In fact, it's not a good idea to, anyway. It's not like some user preference that could be changed often.
In any case, such an API is not documented in the Platform SDK. Obviously there's some way to do it, but that doesn't mean it's documented.
If you want to get the machine's IP address, a simple way is like so:
string name = Environment.MachineName;
IPHostEntry host = Dns.GetHostByName(name);
foreach (IPAddress address in host.AddressList)
if (address.AddressFamily == AddressFamily.InterNetwork)
return address;
return null; This would get the IPv4 address, for example.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank you very much.
Sweet
|
|
|
|
|
Hi Gurus!
I would like to know where I can get information about Network Bandwidth management, Load Balancing management and Modem management? Where are the informations about these subjects with APIs etc.??? I don't find much about this in the MSDN Library...
Thanks.
Best regards to all.
There is no spoon.
|
|
|
|
|
While u could write a client interface in C#, most of the nitty gritty is at system level, hence C/ASM and knowledge how to write a network bridging device driver. I suggest you get something to look at in Linux (there are many) and see how you can port it to windows. There mite even be open source for windows (search for winpcap related stuff).
top secret xacc-ide 0.0.1
|
|
|
|
|
Is there a way to populate a combobox wiht data in a listview. And use the combobox in different forms. For example the listview on form1 contains fist name column, last name column, and account number column. On Form2 I have 3 textboxes (firstName, LastName, accountNumber)a combobox that I want to contain data from the listview on form1. When the user selects an item in the combobox I want it to fill the textboxes with the appropriate data.
|
|
|
|
|
to make the comboBox contain the same data of the listview(limited to 1 column only) you can set the DataSource property of the comboBox to listView1.Items and the DisplayMember property to Text .
in the SelectedIndexChanged event of listView1 object , edit the Text property of the 2 textBoxes:
private void listView1_SelectedIndexChanged(object sender, System.EventArgs e)<br />
{<br />
textBox1.Text=listView.SelectedItems[0].Text;<br />
textBox2.Text=listView.SelectedItems[0.SubItems[0].Text;<br />
}
|
|
|
|
|
I'm stuggling with the readability of my aspx code. How would you format something like this?
<asp:DataGrid
Runat="server" ID="ExceptionGrid"
Width="100%" AutoGenerateColumns="False"
EditItemStyle-BackColor="#ffffcc"
AlternatingItemStyle-BackColor="#66CCFF"
ItemStyle-BackColor="White"
ItemStyle-Font-Name="verdana" ItemStyle-Font-Size="13px"
BorderColor="Black" AllowPaging="True"
PageSize="15" pagerstyle-cssclass="psClass"
onpageindexchanged="ExceptionGridPageChg"
onupdatecommand="ExceptionGridUpdate"
oneditcommand="ExceptionGridEdit"
oncancelcommand="ExceptionGridCancel"
OnSortCommand="ExceptionSortCommand"
datakeyfield="wpr_node_id"
AllowSorting="True">
[Edit] Oh and why won't VS.NET give you the dropdown of the attribute list if you put each attribute on it's own line? Talk about fraustrating[/Edit]
|
|
|
|
|
AFAIK .NET2 will write attributes on seperate lines, for now you are stuck, unless you learn not to use that excuse for a designer
top secret xacc-ide 0.0.1
|
|
|
|
|
Ok, but please tell me there is a way to tell VS.NET to stop autoformatting my code everytime I close the file and reopen it. I'll put each of the attributes on its own line, but as soon as I open the file they are all on one line again and I can't find the setting to get rid of that.
[Edit] Just found it under the tools/options/text editor/html/format [/Edit]
|
|
|
|
|
|
|
Adam Wimsatt wrote:
What do you use?
For? XML editing? Personally i feel XML is merely for data storage, not editing (not sure what the point of XAML is really ). HTML I pretty much steer clear off.
top secret xacc-ide 0.0.1
|
|
|
|
|
Speaking of formatting, don't use both the <pre></pre> and <code></code> tags together. Use CODE to in-line code within your text, or PRE to have a formatted block. They are to be used the same as you'd do for articles here on CodeProject (and other places).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
Hi:
I have a datagrid in my windows application, which is being populated through a dataset.
The records in that grid are grouped according to GroupNumber field. As an example, let’s say there are 3 records with GroupNumber=99, 5 records with GroupNumber=24, 3 records with GroupNumber=67, and 1 record with GroupNumber=87. The total number of records in my grid is 12 records.
I would like to have blue back ground color for records whose GroupNumber=99; and gray/white back ground colors for the rest of records such that no adjacent groups have the same color (i.e. considering 2 adjacent groups, the back ground color for one group should be gray and the other white).
Any clues, ideas, or suggestions would greatly be appreciated since I am stuck and have no idea how to implement that constraint on my datagrid. Thank you very much in advance!
|
|
|
|