Reputation: 9555
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
Reputation: 745
Read these articles in regards to apppoolidentity vs network service http://blogs.iis.net/webdevelopertips/archive/2009/10/02/tip-98-did-you-know-the-default-application-pool-identity-in-iis-7-5-windows-7-changed-from-networkservice-to-apppoolidentity.aspx http://blogs.msdn.com/b/vijaysk/archive/2009/02/13/goodbye-network-service.aspx
Upvotes: 0
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