user339160
user339160

Reputation:

Tree View Directory Browser in Asp.net

I am using a Tree View Directory browser in my application. I am using

DirectoryInfo.GetDirectories()
DirectoryInfo.Getfiles()

My requirement is that I need to browse the server folders from client with this. I am able to access shared drives also from the same machine. I hosted the site in IIS6 in a virtual directory. When I try to access the shared drive from the client I dont find it. Do we have to do something in IIS? I tried giving IdentityImpersonate="true" but still getting same problem.

Upvotes: 0

Views: 848

Answers (1)

MatthewMartin
MatthewMartin

Reputation: 33183

This is a double hop problem. The IIS server would have to do delegation to move your credentials across 2 hops, (your machine to IIS - IIS to file share). Configuring delegation is a tricky process, but I haven't tried in a while, maybe the diagnostics have improved. Normally you follow the delegation instructions and still get access denied.

The easier solution is to use explicit credentials to go from IIS to the file share. The down side to this is that you have to specify username and password of a windows account somewhere in your web.config or source code.

Upvotes: 1

Related Questions