vb.net service and dbf file on network share

I've written an window service in vb.net.
It needs to read our dbf files that are stored on a network share, but whenever it runs it says it cant find the file.
it runs fine if the file is on the local machine, but not when i connect it to the live system (on the network share).
i think this is something to do with the dotnet security settings, but can this be changed? and how?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Usually a Service is executed under the "local System" account.

You need to change this account to your own account or a Service account that has sufficient rights in your network, so it can read the files. The local system wont be allowed to access any network shares (well most likely) You can also do it the other way around and add the local system account from your PC to the network shares.

Hope this helps :)

The question is : which user tries to access the file ?

If your service runs under LocalSystem account, then you cannot see the network shares. You would then have to change the connection settings for your service. If you are inside a domain, you'll have to run the service from an existing user account that is part of the domain, and that have the rights to access the shared folder, where your .dbf file is. You can choose and configure this account in the services panel of the windows control panel.

Of course, you can also create an account only for this task, and fine tune its grants as you wish.

Other point : You cannot access network drives in a service application. Use \\MACHINE\FOLDER\ instead of X:\...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rpterAuthor Commented:
it was the user access and the network drive.

Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.