Print Page | Close Window

Failing to construct a PersistenceManager in a Windows Service

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=154
Printed Date: 07-Nov-2025 at 8:47am


Topic: Failing to construct a PersistenceManager in a Windows Service
Posted By: Customer
Subject: Failing to construct a PersistenceManager in a Windows Service
Date Posted: 12-Jul-2007 at 12:11pm
I’m getting the following error in an application that’s in deployment testing.  It’s an NT service, works correctly in debug and release on my development machine.
 
Timestamp: 3/16/2007 3:55:12 PM
Message: Unable to initialize PersistenceManager
The type initializer for 'IdeaBlade.Util.TraceFns' threw an exception.



Replies:
Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 12:12pm
From your email, it looks like this service works correct on your development machine. but not your production machine.  My best guess at the moment is that this is some type of environmental issue possibly security related.
 
I suspect that the type initializer problem may be due to an inability to write to the log file specified in your ibconfig file.  We have seen other customers who have seen the same or similar type initializer exception attempting to deploy a Windows Service.
 


Posted By: Customer
Date Posted: 12-Jul-2007 at 12:13pm
You were correct, the account specified for the service, which was not LocalSystem, could not write to \Windows or anything underneath it.  We used your suggestion to change the working directory prior to creating the PersistenceManager, and allowed the service account to read/write to that directory, and everything worked as expected.  I’d call this issue closed.



Print Page | Close Window