I am new to .Net.
I have a Windows service in C#. It is going to use another .Net component
(DLL) made by a 3rd party company. If I start my program as an app with that
DLL in the same directory, my program can use it. But if I start it as a
service, it does not work. How does a .Net windows service finds other DLL?
From "path"?
> I am new to .Net.
> I have a Windows service in C#. It is going to use another .Net
> component (DLL) made by a 3rd party company. If I start my program as
> an app with that DLL in the same directory, my program can use it. But
> if I start it as a service, it does not work. How does a .Net windows
> service finds other DLL? From "path"?
I suspect your problem isn't the app finding the DLL, but rather that
applications can't be started as services (at least not without a bit of
tricky code). What is the exact error message that you are receiving?
-mdb
BBM - 29 Apr 2005 22:07 GMT
The service can be started and running.
I can write out a text file in my code.
The 3rd party .Net component I refer to indeed is Apache log4Net.
No log file is created from it, so I don't know whether the service can find
the log4net.dll. Should the log4net.dll be copied into C:\windows\system32 ?
My own text file is found in C:\windows\system32 so the "current" directory
must be "C:\windows\system32".
Does a .Net windows service require a manifest file?
> > I am new to .Net.
> > I have a Windows service in C#. It is going to use another .Net
[quoted text clipped - 8 lines]
>
> -mdb
You usually have to place the called DLL into the GAC, which means that it
must be strongly named.

Signature
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
>I am new to .Net.
> I have a Windows service in C#. It is going to use another .Net component
[quoted text clipped - 4 lines]
> DLL?
> From "path"?