Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a DLL as a service in .NET

Tags:

.net

I have a DLL and i want to know whether it is possible to run the DLL as service.Is there any way to do it ?

i am using .net 2.0.

Thanks in advance.

like image 565
Jebli Avatar asked Aug 12 '09 07:08

Jebli


People also ask

How to run service in Visual Studio?

Start Visual Studio with administrative credentials so you can attach to system processes. (Optional) On the Visual Studio menu bar, choose Tools, Options. In the Options dialog box, choose Debugging, Symbols, select the Microsoft Symbol Servers check box, and then choose the OK button.


2 Answers

I dont think you simple use a DLL as a service directly, but what you can do is create a bridge service, i.e. a web service, WCF or a remotable object, which takes this DLL as a reference and exposes its public methods as a service.

like image 121
Bhaskar Avatar answered Oct 01 '22 21:10

Bhaskar


Wrap it in a windows service? Fairly trivial.

like image 31
Noon Silk Avatar answered Oct 01 '22 21:10

Noon Silk