|
Tom Archer's Inside C# 2nd Edition contains a whole chapter on Threading. It's very in depth and a great resource for anything C# related.
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
eggie5 wrote:
Does anybody know any good C# threading books?
Just another book to look into: C# Threading Handbook[^]
|
|
|
|
|
My application communicates with a remote object, and the interface for that remote object allows client's to register events with the server. One of the registered events is designed to open a new form on the client, and that new form (subclass of Form, not surprisingly) is instantiated and Show()n by the event code itself. The window that's created appears, but it doesn't display properly. Do such windows (created by Events triggered by a remote object) need to be manually placed in the Application thread so they properly update and respond to user key and mouse click events?
Thanks in advance for any help.
Jerry
jerry@cs.stanford.edu
|
|
|
|
|
I am supposed to develop a three tier client server based model application using replicated databases. this is for a class project. I know how to develop an application that will access a database and perform updates and all that using ADO.
My plan is to structure the tiers in the following manner
1->C# windows application that uses data from the data source
2->Middle ware in charge of connecting to the database and performing transactions based on client requests (replication should also take place here)
3->Actual database. Could just be a simple access database.
My confusion is how to separate the windows application from the middleware. I am used to just using datasets et al (ADO) in my application when connecting to the the database. Also how do I go about replicating the database via the middle ware. I am assuming the middleware would handle all client requests. Aslo, how do I connect to any available database through the middleware since that would be the whole point of replicating the database.
I would also like to be able to "plug-in" a database to the middleware and have it brought up to date to the state of the other replicated databases.
One idea I was thinking about was having a separate dataset for each client.
Thanks in advance
|
|
|
|
|
I have a serializable object which contains some events. I do not want the events serialized because they are oftne watched by non-serializable classes. When I try an add Nonserializable() to the events I get a compile error saying that attribute can be added to fields only. How can I avoid seralizing those events?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
The C# compiler is tricking u a bit here:
events get expanded to:
private event
public event {add; remove;}
Thus setup your events as shown above and place the NonSerializable attribute on the private field
HTH
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Ah. Thanks for the Info.
I had another solution to the problem in the intermin. I created an inner class to house the events and the event raising functions. I then exposed the events through properties (as you've shown above). Then I marked the member variable of the class that held the events as nonserializable()
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
Hi, I'm writing a Windows Service that launches a Windows App on startup. So, what I did was, in OnStart( ):
System.Diagnostics.Process process = System.Diagnostics.Process.Start("C:\\Program Files\\Testing\\ThisWinApp.exe");
I successfully installed the service using InstallUtil.exe. When I "start" the service, I keep getting "TypeInitializationException". Account used in ServiceProcessInstaller is "LocalSystem" - does it has permission to run executable and run exe in "Program Files" folder? I can't configure these rights on my XP machine.
Reference: http://www.dotnet247.com/247reference/msgs/30/150246.aspx
Anyway, I used caspol.exe to check permission on the assembly. Intersecting permission from across "level", the assembly (the Windows Service) got "Fulltrust". So, if it's got to do with security, it must be user role launching/starting the service.
Now, if it's not security, perhaps it's got to do with the fact that any class derived from ServicedBase can't launch anything that has a GUI?
Thanks in advance.
norm
|
|
|
|
|
I am familiar with symmetric and asymmetric algorithms. But I know a little about generating public and private keys in asymmetric algorithms, And this is my question:
Is it possible to generate a public key based on a private key? It's very important for me to do that.
Thanks in advance.
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Not really, but it's more a matter of semantics, you generate a key pair. The private key that is stored at keygen time is really more the 'whole key', with the public key being a subset of the information.
With what tool did you generate the private key for which you want a public key?
--
-Blake (com/bcdev/blake)
|
|
|
|
|
You know, I actully want to use the user's password as a private key on the browser. So if the user changes his password, I want to regenerate a public key on the server for the new private key. My idea is just replacing SSL with a new approach(I am somehow sure that it is possible).
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Ah... No, I'm afraid you need to do some more reading about how RSA (and other asymetric ciphers) work.
You can't use a password as a private key, and replacing SSL is impractical for more reasons that I can cover here.
Sorry,
-Blake
|
|
|
|
|
Blake Coverett wrote:
You can't use a password as a private key
Why?
What about using it as a private key in symmetric algorithms?
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Yes, excuse me, I need more studies.
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
1. How'd you delete an installed Windows Service?
I installed a Windows Service I wrote myself, then I tried to install a newer version on top, it threw an exception: "The specified service already exist"
2. How'd you delete event log on "Windows XP" - not clearing log. But to actually delete a log file. I stopped Event Log service from MMC. Then I deleted the log file under the directory:
"C:\WINDOWS\system32\config\MyCustomLog.evt"
I restarted the machine and the event log was restored.
Thanks in advance.
norm
|
|
|
|
|
You aren't suppose to be able to delete an event log, it wouldn't be very "security aware" if you were.
|
|
|
|
|
But it's not system event log (application/security...). It's one that I created myself.
norm
|
|
|
|
|
oh then try
System.Diagnostics.EventLog.Delete ("YourLogName");
|
|
|
|
|
Hey, that's good tips. Thanks. Will try that now =)
norm
|
|
|
|
|
Thanks, first of all. Just a note, I uninstalled the Windows Service:
installutil /u myservice.exe
But "myservice.exe" was the new version. I lost the assembly for the old version, Service1.exe. Is there anyway to uninstall the old version, without the assembly? I understand installutil uses information from the assembly...
norm
|
|
|
|
|
try downloading instsrv, you can get a copy from http://setiathome.berkeley.edu/service.zip, and type
instsrv "ServiceName" remove
|
|
|
|
|
Awe thankyou so much, you've just helped me solved two problems in 10 minutes!
norm
|
|
|
|
|
|
I want to disable the scroll bars in a mdi parent form...setting AutoScroll to false has no effect.
How do I do this?
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Hi
Did you ever find a solution to this problem? We are having exactly the same problem at our project.
Thanks for your help, Mads
|
|
|
|