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 / Languages / C# / April 2008

Tip: Looking for answers? Try searching our database.

Cached Windows Service?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matthias S. - 02 Apr 2008 09:07 GMT
hello,

i've written a windows service using .net framework 2.0 and c#. the
service runs already for a couple of month and everything is fine so
far. now i came to the point, that the service needs an update of the
exectutable and a classlibrary it depends on. funny thing is, even if
the service runs, i can replace the executables without getting any
error (you can't overrwrite a running executable, can you?). and once i
restart the service, its still the old version running.

the task manager shows me, that it is the correct executable that i'm
overwriting. but how come no changes happen? can it be, that the
executable is cached somewhere? how can i force a recaching?

any help is greatly appreceated.

matthias
--
Peter Bromberg [C# MVP] - 02 Apr 2008 12:23 GMT
You would need to stop the service before overwriting the executable and any
dll assemblies that were loaded in memory in the AppDomain. Then restart the
service.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net

> hello,
>
[quoted text clipped - 13 lines]
>
> matthias
Matthias S. - 02 Apr 2008 16:46 GMT
thanks for your reply. yes, this is what i've done prior to posting
here ;)

i've stopped the service, overwritten the existing executables and
started the service again. when my service starts, it writes out the
executable versions to the eventlog. unfortunately, they are still the
same as before overwriting the files. so it seems, the executing
service exe and dll are still the same as before.

i now this might sound weird, but can it somehow be, that the
executable is cached somewhere? i've event tried to overwrite the
executable and restart the entire machine. but still no success.

thanks in advance.

matthias

> You would need to stop the service before overwriting the executable
> and any dll assemblies that were loaded in memory in the AppDomain.
[quoted text clipped - 22 lines]
> >
> > matthias
Peter Bromberg [C# MVP] - 02 Apr 2008 18:30 GMT
You have some other kind of problem here. If your service was stopped and you
were able to clearly overwrite the previous assemblies (and you checked the
file timestamps to be sure) and you've restarted your service, then there
must be something wrong with your logging code.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net

> thanks for your reply. yes, this is what i've done prior to posting
> here ;)
[quoted text clipped - 39 lines]
> > >
> > > matthias

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.