Adding service to c# windows application
-
-
Hi all, In my system in a service is running at the backend.I want to use that service in my windows application how can i do it ? An exe file for that service also i am having. But how can i use that service in my application. Thanks in advance.
-
-
Its a windows service which is already running, but i am not having any svc or any other file.Only exe file of that service is available.
What do you mean by "using" it? If you want to start or stop the service, you can use ServiceController class. If you need to call a method from the service, you should not be using the service at all. If it has class library collection for the business layer and data access etc, use them as reference in your application.
"The worst code you'll come across is code you wrote last year.", wizardzz[^]
-
What do you mean by "using" it? If you want to start or stop the service, you can use ServiceController class. If you need to call a method from the service, you should not be using the service at all. If it has class library collection for the business layer and data access etc, use them as reference in your application.
"The worst code you'll come across is code you wrote last year.", wizardzz[^]
You have not mentioned, How you want to use that service? SVC file is only required to register a service as a windows service, so a simple .EXE file can be register as windows services. You can directly use that Exe file and execute it using Shell command. Regards Rushi