Click here to Skip to main content
15,886,258 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Multiline Text input in PropertyGrid Pin
MoustafaS13-Apr-05 4:48
MoustafaS13-Apr-05 4:48 
GeneralRe: Multiline Text input in PropertyGrid Pin
M. Noordam13-Apr-05 18:44
M. Noordam13-Apr-05 18:44 
GeneralDataView / DataBindings Pin
UschkinRedSunshine13-Apr-05 1:08
UschkinRedSunshine13-Apr-05 1:08 
GeneralI don't know how to use RandomNumberGenerator class. Pin
Mohammed Aijaz Mohiuddin13-Apr-05 0:47
Mohammed Aijaz Mohiuddin13-Apr-05 0:47 
GeneralRe: I don't know how to use RandomNumberGenerator class. Pin
hooray13-Apr-05 1:07
hooray13-Apr-05 1:07 
GeneralRe: I don't know how to use RandomNumberGenerator class. Pin
Sebastian Schneider13-Apr-05 1:32
Sebastian Schneider13-Apr-05 1:32 
GeneralData Grid: Row Based Control Pin
innocent7313-Apr-05 0:37
innocent7313-Apr-05 0:37 
General.NET 2.0 WebBrowser is flickering Pin
Anonymous13-Apr-05 0:07
Anonymous13-Apr-05 0:07 
GeneralRe: .NET 2.0 WebBrowser is flickering Pin
leppie13-Apr-05 5:09
leppie13-Apr-05 5:09 
GeneralRe: .NET 2.0 WebBrowser is flickering Pin
Anonymous13-Apr-05 6:03
Anonymous13-Apr-05 6:03 
GeneralRe: .NET 2.0 WebBrowser is flickering Pin
Dave Kreskowiak13-Apr-05 6:12
mveDave Kreskowiak13-Apr-05 6:12 
QuestionErratic datagrid behaviour? Pin
scotlandc12-Apr-05 22:53
scotlandc12-Apr-05 22:53 
QuestionRegistries????????? Pin
ddmcr12-Apr-05 22:53
ddmcr12-Apr-05 22:53 
AnswerRe: Registries????????? Pin
Vasudevan Deepak Kumar13-Apr-05 4:41
Vasudevan Deepak Kumar13-Apr-05 4:41 
GeneralRe: Registries????????? Pin
ddmcr13-Apr-05 5:23
ddmcr13-Apr-05 5:23 

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.