|
hii,
i am developing a client server application in C#..
In this multiple clients can connect 2 server. I am using a set of 4 servers so that the fault tolerance can be increased in case a server is down..its load can be shared by another server i.e. i am developing a distributed application.
now i want to know how these client requests can be distributed across the set of servers.
i mean suppose i want server should handle 25 clients at max...
if 26th client tries 2 connect to it it should redirect the clients to the another server whch is available...and if all servers are busy then display a message all servers busy..
so can u give me the code as to how load balancing can be done among multiple servers.
any help would be appreciated.thanks in advance
ankita luniya
|
|
|
|
|
I would expect you'd set up communication from the server that users connect to, to the other servers, and they would keep track of how many connections there are, so that you can distribute them as you go, so it's 2/2/2/2, not 8/0/0/0. Also, I wouldn't expect you to create an arbitrary cutoff, who is to say if 26/26/26/26 would not work just fine ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yaa...d arbitrary cut off thing is ok...26 ws jus an example...can u exemplify wht u saud wid an example....??
|
|
|
|
|
Hi,
Is it Possible to use RMI(Java Concept) like concept in .Net?
If Yes-How can we used?
If No-Then other solution for that will be?
Thanks
|
|
|
|
|
|
I'd like to drag metafile from my C# application and drop it in Word, Excel or Visio.
Metafile metafile = new Metafile("meta.emf"); <br />
DataObject data = new DataObject(DataFormats.EnhancedMetafile, metafile); <br />
DoDragDrop(data, DragDropEffects.Move);
I found, that .NET uses new format of the clipboard so older applications cant recognize the dragged .NET metafile.
In this article http://support.microsoft.com/kb/323530[^] is a guide to copy the .NET metafile to the clipboard, so I can paste it later to Word.
But how can I DragDrop this metafile directly to Word ?
|
|
|
|
|
Hey All,
I need help with this urgently, and any would be much appreciated...
I have a CAB file that gets downloaded from a site to a pocket pc or smartphone...
I need to have data attached to it somehow, just a line of text or something, either
in some seperate file or somehow...
This is because I need to have a changing "serial code" to go out with each download of the CAB...
Thanx a million in advance!
|
|
|
|
|
There are libraries that can open cab files, but another solution is to generate your license codes seperately and design your app so each code is verified online and only works on one machine.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanx alot for you advice and swift reply Christian!
you rock...
Seems like these would be the only ways, could you direct
me to any of these libraries? and I hope the lib wouldnt
require me to rebuild my application... thanx again!
|
|
|
|
|
Hi, how can verify if in my computer is installed / available a printer?
Can help me with example?
Thanks a lot.
Alex
modified on Tuesday, March 18, 2008 5:41 AM
|
|
|
|
|
Hi
in the System.Drawing.Printing there's a class called PrinterSettings . This class contains a static Property called InstalledPrinters which holds the names of all installed printers.
greets
M@u
|
|
|
|
|
Thanks! I try this ..
Alex
|
|
|
|
|
Hi,
i registered my own url protocol, something like: test://
But on each click on url it opens new instace of application.
Any idea how to handle all clicked urls in one application instance?
Greetings
|
|
|
|
|
Hi all,
I have write a program for showing added records, couter. but it does not working/showing during the for loop execution. after stoped loop it will show. but i want to show it as continue (1,2,3 ... 50000).
for (intCounter = 1; intCounter;= 50000; intCounter++)<br />
{<br />
lblShowCount.Text = intCounter.ToString();<br />
<br />
oEmployee.AddRecord();<br />
}
Please guide me what would be the better approch for showing continue Counter during the loop execution
Pavan Pareta
|
|
|
|
|
this will do....
for (intCounter = 1; intCounter;= 50000; intCounter++)<br />
{<br />
lblShowCount.Text = intCounter.ToString();<br />
Application.DoEvents();<br />
oEmployee.AddRecord();<br />
}
KSS
|
|
|
|
|
Calling Application.DoEvents is the easy way to fix this. Putting the AddRecord call in another thread, and having the end of the thread call fire a new one, is the better way.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I thought doing 'Application.DoEvents();' was bad practice?
Regards,
Gareth.
|
|
|
|
|
Thanks It is very useful.
Pavan Pareta
|
|
|
|
|
hey guys
ive got a memory leak in a server app im working on...
in a nutshell its a chat server, clients log on and the server relays a message send by one client to all the other clients
when i close it the form goes away but the process is still running
is there any way for me to find out which objects or classes are still running in the background?
how do you guys figure out where a leak lies?
im using visual studio 2008
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Probably some threads are running. If you create a new thread, set property myThread.IsBackground=true.
That means, if you close your process, all threads will be closed also.
|
|
|
|
|
You want to use Clr Profiler. These[^] links should help.
|
|
|
|
|
how do you guys figure out where a leak lies?
In this case (since it seems you've just left a thread running), it's quite easy. First, it's good practice to name your threads when you start them:
Thread t;<br />
t.Name = "mythread"
Now, when you close your program and expect it to exit, but it doesn't, you can use the "break all" option from the debug menu, pausing all threads. Select the threads window from debug->windows to see all running threads and - assuming you named your threads - you can see the thread causing your problem. In most cases you can even double click the thread and see what code it was executing when you pressed "break all".
Standards are great! Everybody should have one!
|
|
|
|
|
Hi, I have this one problem.
I have a ms acces file .mdb. I'd like to read from that file using SQL commands.
I can fill DataSet with returned data from SQL command, but I can't do anything with that strange DataSet.
This is the code I have now. Well it works. but it's completly unusable.
string adres = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=bazz.mdb";<br />
OleDbConnection polaczenie = new OleDbConnection(adres);<br />
polaczenie.Open();<br />
<br />
string pytanie = "SELECT * FROM Tabela1";<br />
OleDbCommand wyslij = new OleDbCommand(pytanie, polaczenie);<br />
OleDbDataAdapter adapter = new OleDbDataAdapter(wyslij);<br />
DataSet dane = new DataSet();<br />
adapter.Fill(dane);<br />
<br />
<br />
label1.Text = dane.Tables[0].Columns.Count.ToString();<br />
label2.Text = dane.Tables[0].Rows[0].Table.Columns[3].ToString();<br />
polaczenie.Close();
How to work on that thing? How to explore DataSet? Isn't there any kind of reader like SQLDataReder for acces files?
Thanks in advance for any answer or links to tutorials where I can find some info
Best regards
|
|
|
|
|
A DataSet contains DataTable s, which contain Columns and Rows.
Coyote.Max wrote: Isn't there any kind of reader like SQLDataReder for acces files?
Use an OleDbDataReader if that's what you want.
|
|
|
|
|
hi
I want to know how to print a textbox text..
Thank u
*** Why EXPERTS behave like a fool ***
|
|
|
|