none
Access MDB on network using Windows Service in C#... RRS feed

  • Question

  • Hi,

     

    In the Windows Service, EFS_Host.MDB in my local machine works. However, the same access database on network, for ex: on K:\EBT\FTPX\EFS_Host.mdb does not work for some reason.

    I get the following error:

    'K:\EBT\FTPX\FTPTestHarness\EFS_HOST.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. 3 12/31/2007 4:54:11 PM

    The same situation works for windows application. Please let me know your thoughts. thanks,

     

    Mallik

    Monday, December 31, 2007 11:44 PM

Answers

  • Seems likely a permission issue. Your sevice account lakes the privilidge to access the local network. You can impersonate a user that has the privilidge, or use an account with network privilidge to run the service.
    Tuesday, January 1, 2008 3:36 AM
  • Your service is running under a different account and not the interactive account so it probably doesn't know anything about the mapped drive letter. You should use a UNC path to the database and not a mapped drive letter.

     

    In addition, the default account under which the service is running probably will not have full permissions to the network resource. You may want to use a domain account to run the service in this instance and make sure that this account has full permissions to the network resource where the database is located.

     

    Wednesday, January 2, 2008 1:25 PM

All replies

  • Seems likely a permission issue. Your sevice account lakes the privilidge to access the local network. You can impersonate a user that has the privilidge, or use an account with network privilidge to run the service.
    Tuesday, January 1, 2008 3:36 AM
  • Your service is running under a different account and not the interactive account so it probably doesn't know anything about the mapped drive letter. You should use a UNC path to the database and not a mapped drive letter.

     

    In addition, the default account under which the service is running probably will not have full permissions to the network resource. You may want to use a domain account to run the service in this instance and make sure that this account has full permissions to the network resource where the database is located.

     

    Wednesday, January 2, 2008 1:25 PM