?
Solved

vb.net service and dbf file on network share

Posted on 2004-11-08
3
Medium Priority
?
851 Views
Last Modified: 2012-05-05
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?
Thanks

Roland
0
Comment
Question by:rpter
3 Comments
 
LVL 11

Assisted Solution

by:rdrunner
rdrunner earned 1000 total points
ID: 12522768
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 :)
0
 
LVL 4

Accepted Solution

by:
Glom earned 1000 total points
ID: 12522781
Hi,

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:\...

Glom
0
 

Author Comment

by:rpter
ID: 12522902
it was the user access and the network drive.

Thank you.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question