Link to home
Create AccountLog in
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
ASKER CERTIFIED SOLUTION
Avatar of dj_alik
dj_alik

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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
Avatar of Sally_S
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.