2

When I run a console app in Visual Studio and open files on my workstation everything runs fine. When I run the same app in Visual Studio and open files on a network share I get an "Access to the path 'xxx' is denied".

I have access to the files in both locations. Does the console app not run as "me"?

BeYourOwnGod
  • 2,345
  • 7
  • 30
  • 35

1 Answers1

0

As an admin you indeed have access to almost everything on the system. Applications and normal users do not however, especially over a network. This is a security feature of most modern operating systems.

For the sake of example, suppose you wanted to access a file in C:/Users/Vance/ (on the target machine). You can't access that or anything else remotely except C:/Users/Public/, until the necessary permissions are set.

See this to learn how to share folders over your local network.

Im not running the exe directly.

The networked machine still needs permission to execute programs remotely on the target machine.

If it's still not working after setting the correct permissions, your firewall is probably blocking the network traffic. In this case you'll need to add a rule to allow it through.

Koby Duck
  • 1,118
  • 7
  • 15