Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Sun, 15 May 2005 04:52:27 -0700,    group: microsoft.public.dotnet.myservices        back       


Windows Service using cached version?   
Hello,

I have a Windows Service (C#) that runs on a Win 2K machine with the .NET 1.1 Framework installed. It's a private assembly, installed using InstallUtil.exe.  When I compile a new version, I'm stopping the service, overwriting the .exe, then restarting the service. It sends status messages to a database, and I can see where it is stopping and restarting.

The problem I'm having is that when the service starts up again, it seems to be using an old version - i.e. bugs I fixed are still occurring, status messages still have old text in them, etc... I tried stopping the service, deleting the .exe, and restarting the service - this gives me an error from the service manager. Then when I put the brand new compiled version in, and restart the service, I still get the old bugs and messages.

I'm at my wit's end about this. I've checked to make sure the new versions are, in fact, different. I'm compiling release mode and just using the default settings in the AssemblyInfo.

Thanks!
Todd

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>WQKmm1TCvUygCblfl0fE7g==</Id>
date: Sun, 15 May 2005 04:52:27 -0700   author:   Todd Davis via .NET 247

Re: Windows Service using cached version?   
Todd -

Hmmm, I do this all the time without the effect you see.

It really sounds like the SCM database is not pointing to the BIN folder 
for your service EXE. Have you verified in the registry to be sure?

Can you log the version in the startup status message, and bump the 
version on a build and see if you are really referencing what you think?

If you DON'T stop the service first before doing your build, does the 
build fail with FILE IN USE BY ANOTHER PROCESS?

Some on our staff report needing to compile solutions twice to get an 
build that is really producing a new binary. But we have never 
understood why.

- Lee

Todd Davis via .NET 247 wrote:
> Hello,
> 
> I have a Windows Service (C#) that runs on a Win 2K machine with the .NET 1.1 Framework installed. It's a private assembly, installed using InstallUtil.exe.  When I compile a new version, I'm stopping the service, overwriting the .exe, then restarting the service. It sends status messages to a database, and I can see where it is stopping and restarting.
> 
> The problem I'm having is that when the service starts up again, it seems to be using an old version - i.e. bugs I fixed are still occurring, status messages still have old text in them, etc... I tried stopping the service, deleting the .exe, and restarting the service - this gives me an error from the service manager. Then when I put the brand new compiled version in, and restart the service, I still get the old bugs and messages.
> 
> I'm at my wit's end about this. I've checked to make sure the new versions are, in fact, different. I'm compiling release mode and just using the default settings in the AssemblyInfo.
> 
> Thanks!
> Todd
> 
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
> 
> <Id>WQKmm1TCvUygCblfl0fE7g==</Id>
date: Mon, 16 May 2005 10:37:11 -0700   author:   Lee Gillie

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us