|
Hi, guys
I use NATUPNPLib in order to allow my application to be reachable from Internet, although it is running on machine behind router (IGD). So I use this library to add port mapping/forwarding. But now I am kind of confused and I need help.
My first question is which IP to add in the mapping table for "local"? I've got several IPs returned by Dns.GetHostEntry(Dns.GetHostName()) for my machine, because I've got several network adapters. And I don't know which one to use for port mapping. If there is any records in the mapping table, I could examine an existing local IP from the table and I could compare it to my IPs to choose one of them. But what should I do when there aren't records?
My second question is, hypothetically, what will happen if there are more than one routers which the machine is connected to (through different adapters)? Which router will NATUPNPLib represent? Maybe all together? And in this scenario (several routers, each one connected to Internet) which adapter/router will Windows use to connect to Internet?
Best regards
|
|
|
|
|
Well, you're either going to have to write code to determine the best path to the router you want (not exactly easy), or better yet, make your app flexible and let the user decide which adapter and/or IP to use. You'd probably want to create some kind of configuration form to do this.
|
|
|
|
|
Just a matter of curiosity and general knowledge..easy question it seems but I didn't find an answer
My project (I'm using VS2008) targets .net framework 3.5, but after compiling the IDLASM shows:
// Metadata version: v2.0.50727
and examining the loaded application, the used DLLs really points to the 2.05 framework...should'nt it target the 3.5 ?
Thanks for any help
|
|
|
|
|
It is targetting 3.5. .NET 2.0, 3.0 and 3.5 all use the .NET 2.0 CLR.
.NET 3.0 and 3.5 are just set of extensions to the .NET Framework Class Libraries. Neither of them introduced any additional functionality to the .NET CLR.
|
|
|
|
|
This is the answer I thought I'd get, but I found many articles refering to this as the required framework version. So, how can I get the required framework from the assembly file ?
Thanks a lot.
|
|
|
|
|
The line you're look at is telling you the .NET CLR version that is required to execute the code, not the .NET Framework version. The CLR is the virtual machine runtime that executes the code. The Framework is the class library that supplies the functionality for the thousands of classes you can use in your code.
There is nothing in the metadata that specifies the .NET Framework version that is required to run the app. What you see in the manifest is the required .NET CLR version. Under that, you'll see a bunch of .assembly extern references. Each of these imports a namespace, specifying the public key and VERSION NUMBER the loader must bind to. Each reference can have it's own version number seperate from the rest. For example, if you create a blank WPF app targeting .NET Framework 3.5, you see the MSCORLIB is version 2.0, from .NET 2.0, SYSTEM from .NET 2.0, PresentationFramework from .NET 3.0, and WindowBase from .NET 3.0.
|
|
|
|
|
I want to logout from my account totally and return control to the Login page
|
|
|
|
|
manjusha s wrote: I want to logout from my account totally and return control to the Login page
Well then I suggest that you do so.
In the mean time, stop posting the same question over and over. If anybody either can, or is willing to help you they will, but they will not feel inclined to do so if you start spamming the forums.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Will you stop bumping this post.
A. This isn't the ASP.NET forum.
B. It's rude to bump posts.
C. You'll be ignored by people now.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
i am BSC(CS) graduate from mumbai, working as soft.developer in small accounting software company,basically i m working on .net-2008 and 2005 using vb as P-language,but now i want to switch to robotics technologies,
so can any one suggest me wht should be my first step to learn robotics PL and how can i switch my career to robotics field as coder.
|
|
|
|
|
|
the page should be totally logged out from the account and control should pass directly to the Login page
|
|
|
|
|
yes, I agree, the page should be totally logged out.
|
|
|
|
|
Actually i have written
Response.Redirect("Login.aspx");
on logout button,but i want totally to be logged out from the account and the
control should pass to login page again..
Thanks in advance
|
|
|
|
|
Stop making a new thread, when you are replying to a previous post.
Use the Reply rollover on the response you wish to reply to.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Guys,
I'm trying to get my forms to clean up after themselves when i dispose them. The designer builds all the lovely disposal pattern stuff, with the body:
<br />
if (disposing && (components != null))<br />
{<br />
components.Dispose();<br />
}<br />
base.Dispose(disposing);<br />
Which is all well and good, but as i add components to the designer, i would assume they would be placed in a container and cleaned up when the form disposes, however, the container is always null, and hence the dispose is never called.
Because of this my background worker keeps running and my underlying win32 api calls are never closed down.
While i can (and will) do this the manual way, is there any way to have the designer wire up that logic for me?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
If this is a Windows Forms application and you are adding the components using the designer the necessary code for disposing them is generated automatically, or at least should be.
As far as a background worker is concerned, it is working in the background, in a different thread, and that will continue to run. Try handling the FormClosing event and stop the background worker there.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: or at least should be.
Yeah, i thought the same, but it's clearly not doing any finalizing or disposing when i close the form. The app is quite complicated, a lot of components being shared between multiple forms, but some of the forms contain components only applicable in that scope, and the form gets re-used, so i don't want to do cleanup on close, but only on dispose which occurs when the app gets dismantled.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Ah.
I'm not sure of what happens in Dispose() when the control/component is referenced elsewhere.
You could try handling Application.ApplicationExit maybe?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I've got the Close event handled in the application host form, and it disposes the primary application container, but i was hoping it would tidy up the various components in the nested containers / forms.
(And thinking about this gives me a headache...)
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Sounds like you need to consider using a WeakReference or two.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
[Edit] - Never mind, i didn't realize that WeakReference was a class. I thought it was just the opposite of tight coupling. :P
Now... coffee...
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Actually multiplication of MemberCount and Commission Should be done and result should get displayed in MemberGrandTotal when we hit Show button....and as the registration forms get filled by the customer automatically the values in MemberCount should be increased and as per that result should get displayed...Also the values in MemberCount should remain same to values in Distributor..It should not exceed the count.
My code is as below...
String s = "Data Source=.\\sqlexpress;Initial Catalog=MLM;Integrated Security=True";
SqlConnection con = new SqlConnection(s);
con.Open();
DataSet ds = new DataSet();
int Level=1;
foreach (DataRow dr in ds.Tables[Level].Rows)
{
String s1="Select MemberCount,Commission,MemberCount*Commission from LevelCount ";
}
//DataSet ds = new DataSet();
SqlCommand com = new SqlCommand(s1, con);
SqlDataReader rs = com.ExecuteReader();
while (rs.Read())
{
Label10.Text = rs.GetInt32(0).ToString();
Label9.Text = rs.GetInt32(2).ToString();
Label11.Text = rs.GetInt32(0).ToString();
Label12.Text = rs.GetInt32(0).ToString();
Label13.Text = rs.GetInt32(0).ToString();
Label14.Text = rs.GetInt32(0).ToString();
Label15.Text = rs.GetInt32(0).ToString();
Label16.Text = rs.GetInt32(2).ToString();
Label17.Text = rs.GetInt32(2).ToString();
Label18.Text = rs.GetInt32(2).ToString();
Label19.Text = rs.GetInt32(2).ToString();
Label20.Text = rs.GetInt32(2).ToString();
}
//rs[5] = s;
com.ExecuteNonQuery();
//rs.Close();
con.Close();
and table is as follows....
Level Distributors MemberCount Commission GrandTotal MemberGrandTotal
1 5 5 25
2 25 10 250
3 125 10 1250
4 625 10 6250
5 3125 10 31250
6 15625 15 234375
Show
Thanks in advance......
|
|
|
|
|
I am afraid that the code you have posted is so badly broken, that I am at a loss to know how to help you.
Also your explanation of your problem is not sufficiently clear to enable me to attempt an answer.
Please try to rephrase your question, so that someone who is not familiar with your application, can understand what it is that you require.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
multiplication of columns MemberCount and Commission upto Levels 1 to 6 is to be done and result should be displayed into the column MemberGrandTotal
|
|
|
|