Application/Service using registry warning message during log off

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have an application (VS2010 and C#) which when installed on a Win XP/Win 7 machine installs an application and a Windows Service together, and starts a process running when the user is logged in. This service is then started when the user logs out &
app process stops, and service stopped by the app process when the user logs back in. Basically either the application process is running (when the user is logged in), or the Windows Service is started (when the user logs out).<span>
Both the application process and Windows Service check different xml files (a specific path when logged in and another path when logged out).
This works fine overall, but sometimes when I log out, it takes longer than normal and when I log back in again and look at the event viewer (eventvwr), it shows the following message as a warning (more so in Win XP and after and the user hibernates).
For example, the user is logged in, then performs a hibernate, then logs out so the application recognises this and starts the Windows Service, and this causes the message below.
Note: the service is using a Network Service (as suggested as a fix below).
So my questions are: is this due to the same location in the registry for both the Windows Service and application process, or is it something else? Also this seems to happen after the user hibernates, starts up again and then logs out, so should
I try to restart/refresh my application after a hibernate? <span> Finally, I tried using regedit and registry cleaners but cant see what exactly is happening, so how should I see what is happening when the user logs off.
Message in event viewer:
Windows saved user Domainuser1 registry while an application or service was still using the registry during log off. The memory used by the users registry has not been freed. The registry will be unloaded when it is no longer in use. This is
often caused by services running as a user account, try configuring the services to run in either the LocalService or NetworkService account. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
<hr class="sig Stephen

View the full article
 
Back
Top