|
LMAO, your wasting your time with that one (I mean the question)
|
|
|
|
|
Does this LOOK like the ASP.NET forum to you ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: Does this LOOK like the ASP.NET forum to you ?
Sure it does - it's got orange bits at the top and the side and blue bits with questions in. Existentially, this could all be viewed as one big ASP.NET forum.
|
|
|
|
|
Good point..... you forgot the key thing, the url has aspx in it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
lachu009 wrote: How to implement kerberos authentication in ASP.net..
Well, you're hosed if you don't have a kerberos server.
|
|
|
|
|
Use Windows Authentication from a Windows Domain server.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
I created a client-server application where I installed the client on 10 computers in a network (LAN)... now since the IP address of each computer are dynamic.. I created my server in such a way that I will scan the network from something like 192.168.1.1 to 192.168.1.255 just to find those 10 computers. It works, it was able to detect the 10 computers which is running the specific service.. My problem is that the detection is too slow.. starts from 192.168.1.1 (30 seconds) then 192.168.1.2 (another 30 seconds) so like an average of 30 seconds for each IP... is there a way to fasten this up?
|
|
|
|
|
I'm not sure if there's a 'proper' way. Have you tried pinging the addresses first to see if they exist? I would be testing several at once using threading too.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I am only running the scan on a single thread and i'm planning to create more... Regarding the "detection" if the IP exists on the network... how do i do that? i used the Dns.getHostByAddress but it seems like it failed.
|
|
|
|
|
In the System.Net.NetworkInformation namespace, there is a Ping object, that can ping either an IP address, or a host-name (the name of the computer). Use the Ping.Send( string ) or Ping.Send( IPAddress ) methods and get a PingReply object with details about the host or address pinged. See
|
|
|
|
|
In the System.Net.NetworkInformation namespace, there is a Ping object, that can ping either an IP address, or a host-name (the name of the computer). Use the Ping.Send( string ) or Ping.Send( IPAddress ) methods and get a PingReply object with details about the host or address pinged.
See How to ping a hostname/ip using ASP.NET 2.0 and C# .NET[^] for an example of using the Ping and PingReply objects.
|
|
|
|
|
I use conditional compilation symbols to enable and disable client cusomised parts of my code.
Is there a built-in way to determine at run time what symbols were defined at build time?
|
|
|
|
|
Take five minutes and think again about your question, I think you already gave yourself the answer
The answer is "No". The IL does not contain any references to the code not compiled by the preprocessor directives.
Code like this:
#if DEBUG
Console.WriteLine("Debug");
#else
Console.WriteLine("Release");
#endif
will lead to following IL code:
L_0000: nop
L_0001: ldstr "Debug"
L_0006: call void [mscorlib]System.Console::WriteLine(string)
L_000b: nop
if compiled in debug mode, otherwise "Release".
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Sure, I realised I could engineer code to produce exactly that, but I wondered if it might have been built-in. Perhaps in the assembly meta data, and reflection would be able to find it. But I guess not.
thanks anyway
|
|
|
|
|
Certainly not automatically, but if it's important enough you could probably engineer a mechanism.
Something along these lines comes to mind:
public static readonly System.Collections.Generic.HashSet<string> DefinedOptions =
new System.Collections.Generic.HashSet<string>() ;
...
# if DEBUG
DefinedOptions.Add ( "DEBUG" ) ;
...
# endif
But that would only work where such statements are valid.
On the other hand, I question whether or not using conditional compilation is an appropriate technique for your requirement.
|
|
|
|
|
Hi all,
I am trying to create a custom toolstrip control, that will allow me to put in some toolstripbuttons that should display each time I make use of this control in a form. This way I don't have to recreate the toolstip over and over again.
So first question, is this the right way of doing it? and secondly how does one create such a control sothat when you place the control on your form, the toolstripbuttons actual display?
Many thanks in advance
Kind regards,
The only programmers that are better those C# programmers are those who code in 1's and 0's |
Programm3r
My Blog: ^_^
|
|
|
|
|
Sounds reasonable. Derive a class from ToolStrip, and in the constructor add your buttons to it. You can then just use this interchangably with a normal ToolStrip on your forms.
Regards,
Rob Philpott.
|
|
|
|
|
|
Simple, this will add a ToolStripLabel label1 by default.
using System.Windows.Forms;
namespace MyControls
{
public class MyToolStrip :ToolStrip
{
ToolStripLabel label1;
public MyToolStrip()
{
InitializeComponent();
}
private void InitializeComponent()
{
label1 = new ToolStripLabel();
label1.Text = "Tool Strip Label";
Items.Add(label1);
}
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
|
|
This would be better if the event were passed to the form that has the toolstrip. 2 Options:
1. Make the button public public ToolStripButton button1; then it can be accessed in the form
myToolStrip1.button1.Click += new EventHandler(button1_Click);
2. Better I think, raise your own ButtonClick event.
public event EventHandler ButtonClick;
ToolStripButton button1;
public MyToolStrip2()
{
InitializeComponent();
}
private void InitializeComponent()
{
button1 = new ToolStripButton();
button1.Click += new EventHandler(button1_Click);
button1.Text = "Open another Form";
Items.Add(button1);
}
void button1_Click(object sender, EventArgs e)
{
EventHandler eh = ButtonClick;
if (eh != null)
eh(sender, e);
} then access the ButtonClick event of your toolstrip in the normal way
myToolStrip1.ButtonClick += new EventHandler(myToolStrip1_ButtonClick);
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Thank you very much for the helpful input.
Kind regards,
The only programmers that are better those C# programmers are those who code in 1's and 0's |
Programm3r
My Blog: ^_^
|
|
|
|
|
You're welcome
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
An article that I wrote for the CodeProject might help: Custom ToolStrip Renderers[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|