How to access a network drive from a Windows service?

G

Guest

I have a VB .NET app that lets you create a DTS Package that copies data from
an SQL Server to a database located in the specified path (it should work
with both local and network drives). You can either run the package from
within the application or as a Windows service. If I specify a network drive
and run the package from the app, the data is being copied fine, but the
service gives me "Table not accessible" error. My understanding is I have to
configure my Windows service to run with the proper domain user account. In
other words, I need to set my service to log in with an account with the
appropriate permissions to the network path I want to access. What's the
syntax for that? What functions do I have to use? I could not find any sample
code.

Thank you for help.
 
G

Guest

My service was able to access the network drive after I unchecked "Local
System account" and specified my network account through Administrative
Tools/Services, but is there a way to let the user specify the account
through the application?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top