Hello-World
Hello-World

Reputation: 9555

access denied on DirectoryEntry bind

Can you please help

I get "access denied" on DirectoryEntry bind

Can you please help?

I'm no my windows 7 pro on my pc and am using the local iis 7.5 version.

And I do not understand what this answer means DirectoryEntry.NativeObject throws access denied for a user in Administrators group in windows 2008

solution 1: run as admin does not work.

I have three sites on my iis server local:2001/ local:2002/ local:2003/ there will be more but for now this is a test

In the code behind of local:2001/ I'm trying to get the folder path of for example

local:2003/ but all I have is its port number but I get I get "access denied" on DirectoryEntry bind

Upvotes: 1

Views: 1803

Answers (2)

Qpirate
Qpirate

Reputation: 2078

If you are trying to access or write to a folder outside the scope of your website, then in under IIS -> AppPools find your appPool and change the identity from ApplicationPoolIdentity to NetworkService.

this should solve your issues.

FYI To change the identity you need to look in the Advanced Settings.

but without further details we are only guessing.

Upvotes: 1

Related Questions