Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / April 2005

Tip: Looking for answers? Try searching our database.

how windows service finds another .Net component

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BBM - 29 Apr 2005 18:08 GMT
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"?
mdb - 29 Apr 2005 20:47 GMT
> 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
Nick Malik [Microsoft] - 30 Apr 2005 17:56 GMT
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"?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.