user571874
user571874

Reputation: 589

DirectoryNotFoundException - could not find a part of the path

I need to connect to share folder on the remote PC.

I realize this is as follows: Double-click My Computer, click Service, click Add Network disc, and enter network address to the textbox and choose Letter of disc.

And then makes the connection by address:

Z:\\\\ -> refers to   \\\\10.201.1.1\\ABC\\)

When prescribes the way in asp, then I have the correct access only if the server is running with VS, as well as through IIS, I get an exception.

Upvotes: 0

Views: 2136

Answers (2)

Joachim VR
Joachim VR

Reputation: 2340

When you run a website through your local debugger in visual studio, you run the website with the permissions of your windows user, giving you access to the files.

If you run the site on IIS, your website has much more restricted permissions. Normally, in IIS, the website won't be able to access files outside the website directory.

You might solve this by giving your asp.net windows account more permissions, but this is highly ill-advised, since this is a massive security problem.

Upvotes: 1

marcoaoteixeira
marcoaoteixeira

Reputation: 505

Check the trust level of your application. You are trying to access a network driver. I guess that IIS policy won't permit that.

Upvotes: 0

Related Questions