Click here to Skip to main content
15,915,072 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple DB2 question Pin
Vasudevan Deepak Kumar13-Apr-05 4:38
Vasudevan Deepak Kumar13-Apr-05 4:38 
GeneralRe: Simple DB2 question Pin
trk_wakil13-Apr-05 7:01
trk_wakil13-Apr-05 7:01 
GeneralRe: Simple DB2 question Pin
Vasudevan Deepak Kumar13-Apr-05 19:30
Vasudevan Deepak Kumar13-Apr-05 19:30 
GeneralRe: Simple DB2 question Pin
trk_wakil14-Apr-05 4:48
trk_wakil14-Apr-05 4:48 
GeneralAsymmetric encryption in config files Pin
Esmo200013-Apr-05 4:11
Esmo200013-Apr-05 4:11 
GeneralRe: Asymmetric encryption in config files Pin
turbochimp13-Apr-05 5:42
turbochimp13-Apr-05 5:42 
GeneralRe: Asymmetric encryption in config files Pin
Esmo200013-Apr-05 5:49
Esmo200013-Apr-05 5:49 
GeneralRe: Asymmetric encryption in config files Pin
turbochimp13-Apr-05 6:45
turbochimp13-Apr-05 6:45 
GeneralRe: Asymmetric encryption in config files Pin
Esmo200013-Apr-05 9:59
Esmo200013-Apr-05 9:59 
GeneralRe: Asymmetric encryption in config files Pin
turbochimp13-Apr-05 10:54
turbochimp13-Apr-05 10:54 
GeneralRe: Asymmetric encryption in config files Pin
Ashok Dhamija13-Apr-05 22:00
Ashok Dhamija13-Apr-05 22:00 
GeneralLimit the transfer speed of file copyies Pin
Andemann13-Apr-05 3:00
Andemann13-Apr-05 3:00 
GeneralRe: Limit the transfer speed of file copyies Pin
Dave Kreskowiak13-Apr-05 4:14
mveDave Kreskowiak13-Apr-05 4:14 
GeneralInheriting ProxyAttribute Pin
Zgaddo13-Apr-05 2:56
Zgaddo13-Apr-05 2:56 
GeneralRe: Inheriting ProxyAttribute Pin
leppie13-Apr-05 3:02
leppie13-Apr-05 3:02 
GeneralODBC Pin
jobrown5vt13-Apr-05 2:36
jobrown5vt13-Apr-05 2:36 
GeneralRe: ODBC Pin
turbochimp13-Apr-05 3:19
turbochimp13-Apr-05 3:19 
GeneralRe: ODBC Pin
jobrown5vt13-Apr-05 4:34
jobrown5vt13-Apr-05 4:34 
GeneralRe: ODBC Pin
turbochimp13-Apr-05 5:13
turbochimp13-Apr-05 5:13 
GeneralStretching/Shrinking Images Pin
MarkMokris13-Apr-05 1:41
MarkMokris13-Apr-05 1:41 
GeneralRe: Stretching/Shrinking Images Pin
Mathew Hall13-Apr-05 2:21
Mathew Hall13-Apr-05 2:21 
GeneralData reading from ASP.NET to C# Pin
tgprakash13-Apr-05 1:25
tgprakash13-Apr-05 1:25 
GeneralRe: Data reading from ASP.NET to C# Pin
Esmo200013-Apr-05 4:27
Esmo200013-Apr-05 4:27 
I doubt that this is the best solution to your problem but it is one way that you might go about it.

First, I'll go over the service. I don't know why you would be starting this service frequently. If it starts and stops a lot then it perhaps should not be a service but just a regular application. Do you have a good reason for that? If in really needs to be a service I would just have some code that checks if it is running. If not, there is a program called installutil (it is a part of the .NET framework so it should be there on the machine already. Also, to start processes lookup System.Diagnostics ). You can use that program to install it. Then, you can put this code in your installer

<br />
private void serviceInstaller1_AfterInstall(object sender, System.Configuration.Install.InstallEventArgs e)<br />
		{<br />
			ServiceController sc = new ServiceController("The name of the service");<br />
			if ( (sc.Status.Equals(ServiceControllerStatus.Stopped) ) )<br />
				sc.Start();<br />
		}<br />


That way, when you install the service it will start running.


Now, as to how no get the information to the service, that IS a bit tricky... What are you trying to get there? If you do end up using an application then you could consider passing it as a paramater? If you use a service... well, you could consider possibly using the MSMQ. Just serialise all your data and send it that way.

I hope this helps,
Please ask me if I can explain any of the stuff better!
Jim

Did I post well? Rate it! Did I post badly? Rate that too!
GeneralRe: Data reading from ASP.NET to C# Pin
tgprakash13-Apr-05 20:17
tgprakash13-Apr-05 20:17 
GeneralMultiline Text input in PropertyGrid Pin
M. Noordam13-Apr-05 1:16
M. Noordam13-Apr-05 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.