0

I am trying to find ways, by which a user can open a folder on web-server on button click in a web application, based on windows authentication and no impersonation.

Two methods, that i have came across are :

  • Using href link, it works, but only in IE.

    <a href="\\test\c$\xyz">Open</a> "

  • Using C#, It doesn't seem to work, i gave permissions to Application Pool and Users to access the folder, but was getting access denied.

    System.Diagnostics.Process.Start(@"\\test\c$\xyz");

Nanu
  • 3,010
  • 10
  • 38
  • 52

1 Answers1

0

Starting with "accessing to administrative shares isn't a good idea", if your users attempts to access to it as normal user (i.e. probably not logged/verified by a domain controller) will surely fails.

Assuming you want to access to a granted share you should link using file: as URI scheme.

Local folder:

<a href="file:///D:/Downloads/">click me</a>

Remote folder:

<a href="file://///test/sharedfolder/">click me</a>

here works both with IE and FF.

Read this: http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx

Taken from: How to open a windows folder when clicking on some link on a HTML page using Python

Community
  • 1
  • 1
Squiffy
  • 175
  • 1
  • 4
  • 11