Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Access denied to folder using impersonation on IIS 6


Access denied to folder using impersonation on IIS 6

Author
Message
ayo
ayo
Forum Guru
Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)Forum Guru (105 reputation)

Group: Forum Members
Posts: 1, Visits: 4
I’m using impersonation on my web application in order to identify who is currently logged onto the client. For example “John Smith”. This side of things works fine as the web page lists the name and email address of whoever is logged onto the machine.



My web.config file contains…

authentication mode="Windows"



identity impersonate="true"

authorization

deny users="?"

authorization



I have a folder on the company network and when a user submits a request on my web page, a sub folder gets created. There is an AD security group setup for this folder and “John Smith” has access to it.



When I run the code from my PC in debug mode all works fine and the sub folder gets created as it should. My problem comes when I release the application to the Intranet server. When I run the web page as “John Smith” from the Intranet, I get the error:



Error: Access to the path is denied.



I’m running this via IIS v 6 (I know, it’s an old server!).



The application pool identity is set to “Network Service” and I have added Network Service to the folder permissions with modify access.



Am I missing something or is there another account that it would use which requires access to the folder? I’ve also tried the ASP.NET account with no success.



Thanks



TallOne
TallOne
Forum God
Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)Forum God (4.4K reputation)

Group: Forum Members
Posts: 370, Visits: 212
I would add "Everyone" just to see if things work as expected. In IIS expand Application Pools and click the Identity tab and check the service name. Could be LocalSystem, Local Service, Network Service of the LOCAL Machine..not a domain account. Trial and error...

TallOne
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search