Avatar of Sally_S
Sally_S
 asked on

Network App and Shared Docs

We have a small application (vb.net 2008) that we want to allow users to run from a network server. There are also a couple of Access datafiles that the application needs that are on the server in Shared Documents. In our single user app, we get shared documents using the SHGetFolderPath API. However, when running from a network server, that doesn't work because the path it returns is valid for the server (C:\Users\Public\Documents) but not for a workstation. How can I get a path to shared documents that will work from the workstation so they can access the files?

Thanks for any help
Visual Basic.NET

Avatar of undefined
Last Comment
Sally_S

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
dj_alik

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Lethal_J

The solution posted by dj_alik is probably your best option, using UNC paths to access the shared folders directly.  If, however, this is not possible due to security the only other way is to have your server retrieve the requested file and host it for the clients to retrieve.  For instance:

Client Request > Server Access FileStore > Server Copies Locally > Server Returns Path to Local Store > Client Retrieves Document > Server Destroys Temporary Local Filestore
Sally_S

ASKER
Thanks for the answers. I agree - dj_alik's answer is the one I'll use. Fortunately, we can require that certain permissions be set, so it should work for us.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy