I have created a Windows service to manage some files for me. For debugging purposes I wrote a console entry point as well so all my code for the actual service is an a separate class from the windows service. I am using a SQLite DB with fluent NHibernate to store settings etc.
When I run the console mode, it works perfectly, but when trying to start the process it doesn't. I have done a debug on start with my process and found that when NHibernate tries to create the session, it can't see the db file even though it does exist.
I have setup the process to run as an administrator, and have also tried running it as the local system account with "Allow access to desktop
" enabled, but it still won't pick up the DB file. This means that NHibernate can't load the file so it creates a new one, and when my service tries to load data from the DB it fails since it has a blank DB File loaded.