HighTechTalks DotNet Forums  

how windows service finds another .Net component

Dotnet General Discussions microsoft.public.dotnet.general


Discuss how windows service finds another .Net component in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
BBM
 
Posts: n/a

Default how windows service finds another .Net component - 04-29-2005 , 12:08 PM






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"?

Reply With Quote
  #2  
Old   
mdb
 
Posts: n/a

Default Re: how windows service finds another .Net component - 04-29-2005 , 02:47 PM






=?Utf-8?B?QkJN?= <BBM (AT) discussions (DOT) microsoft.com> wrote in
news:BA61E5C2-2B44-42C5-A58F-5D6127A3C4CE (AT) microsoft (DOT) com:

Quote:
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


Reply With Quote
  #3  
Old   
BBM
 
Posts: n/a

Default Re: how windows service finds another .Net component - 04-29-2005 , 04:07 PM



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?


"mdb" wrote:

Quote:
=?Utf-8?B?QkJN?= <BBM (AT) discussions (DOT) microsoft.com> wrote in
news:BA61E5C2-2B44-42C5-A58F-5D6127A3C4CE (AT) microsoft (DOT) com:

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


Reply With Quote
  #4  
Old   
Nick Malik [Microsoft]
 
Posts: n/a

Default Re: how windows service finds another .Net component - 04-30-2005 , 11:56 AM



You usually have to place the called DLL into the GAC, which means that it
must be strongly named.

--
--- 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.
--
"BBM" <BBM (AT) discussions (DOT) microsoft.com> wrote

Quote:
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"?



Reply With Quote
  #5  
Old   
anonymous coward
 
Posts: n/a

Default RE: how windows service finds another .Net component - 06-25-2010 , 06:51 PM



What a load of horse chit. Installing to the GAC is not at all necessary a whole lot of the time. Why give such a BS answer?

From http://www.developmentnow.com/g/34_2005_4_0_0_511825/how-windows-service-finds-another-Net-component.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.