Win service and network databases

  • Thread starter Thread starter Strahimir Antoljak
  • Start date Start date
S

Strahimir Antoljak

I just finished development of a windows
service (some kind of billing service, keep track
of applications usage, and then write the usage
to a database - used by whom, time spent, etc).
I tested all locally and it worked fine.

The windows service is supposed to
have read/write privileges to two
databases located on the network,
so I changed local database paths
to network database paths and I am
getting this error:

The Microsoft Jet database engine cannot open the file
'\\MSAccess_network_database_name'. It is already opened exclusively by
another user, or you need permission to view its data.

Again, when the database was saved locally
and the service would point to it, all works
well, but with the database on the network,
it would not allow me to open the connection.

Anyone can give me some help on this issue?
Is it possible anyhow to give some permissions
to the service (actually SYSTEM user) to
open the database connection and how?

Thanks
 
You can give LocalSystem access IF the machine is Win2k or WinXP and the
domain is an Active Directory domain. The localSystem account is actually an
"authenticated user" in that scenario. You end up having to give rights to
authenticated users to make it work. You MAY be able to grant rights to the
machine account, although I am pretty sure the GUI won't let you grant the
rights that way.

Another option is to run the service as a domain account instead of as
localsystem.
 
Jerry,

can I set Active Directory domain as
an domain programmatically. Or how
do I set it otherwise? Thanks

--
Strah


Jerry Ham said:
You can give LocalSystem access IF the machine is Win2k or WinXP and the
domain is an Active Directory domain. The localSystem account is actually an
"authenticated user" in that scenario. You end up having to give rights to
authenticated users to make it work. You MAY be able to grant rights to the
machine account, although I am pretty sure the GUI won't let you grant the
rights that way.

Another option is to run the service as a domain account instead of as
localsystem.
 
Back
Top