0

I am having a strange problem with my WPF desktop application that it cant find a shared folder on a server on the local network.

This problem occurs on 2 machines that I have encountered to date.

The path is to a shared folder as I say on a local server pointing to a folder which contains Visual FoxPro database files ( dbf files )

Within my program I get the value of the path from my app.config file. I then use the path to set up an OLDEB connection to read the data in a dbf file ( visual foxpro table )

I have the path stored as an appsetting in the app config in the following format : \SERVERNAME\sharedFolder

Within my code I retrieve the path value into a variable 'path' and use that value as so : @path

I have also installed the Microsoft Visual FoxPro OLE DB Provider driver.

I installed my program on several windows 7 machines. All of which are part of a workgroup and not a domain. 2 machines out of 5 produce the following exception message " Invalid path or file name. "

UAC settings are the same on all machines also.

On the machines that the error occurs, I can access the shared folder by entering the path ' \SERVERNAME\sharedFolder' in the address bar .. so, the folder is definitely accessible.

I am not sure what else to check if all machines ( as far as I can see ) are set up the same.

Any help would be appreciated.

many thanks in advance

Kev
  • 743
  • 2
  • 14
  • 32
  • possible duplicate of [I can't access unc path from C#. Getting access is denied](http://stackoverflow.com/questions/17708654/i-cant-access-unc-path-from-c-getting-access-is-denied) – Alan B Sep 08 '14 at 07:37
  • Hi Alan, the application I am using is a WPF desktop application and not a web application.... thanks :) – Kev Sep 08 '14 at 08:40
  • If the app is the same, the only thing that can be is the client PC acces, chek the user/permissions ... read/write permissions... make sure that 2 clients use the same user/pwsd: You can put logs (or messagebox) of the user / pswd/ and folders – Albert Català May 04 '15 at 08:44

1 Answers1

0

Something to test on a client where it doesn't work is replace the SERVERNAME with the IP address. It could be a DNS resolution issue. (ran into my share of those.)

If it still cannot access that server then I would assume the issue is security. check the users security permissions. If you can get them to log into your dev pc and try running the code so you can see the issue. If not make a test app that just accesses that location and variants such as just \SERVERNAME etc and see what it does. Test read and then write separately.

Obviously check manually that the server can be read from / written to from that PC.

Kelly
  • 6,992
  • 12
  • 59
  • 76