Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2004, 07:59 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default File Access Permission problem w/o using impersona

Hello
When I try to delete file from folder I get System.UnauthorizedAccessException. The error is suggesting I use impersonate. Can I get around without using impersonate??

My ASP.Net account is set to Full control but I still get the same error:

Exception Details: System.UnauthorizedAccessException: Access to the path "E:\Inetpub\wwwroot\x\Pix\" is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.


What can be wrong?

 
Old September 15th, 2004, 12:54 AM
Registered User
 
Join Date: Sep 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to heroman
Default

open the folder property page,click the security tab
highlight the "Users" Account and checked the full control

Study,Progress,Life...
 
Old September 15th, 2004, 07:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Try setting the full control at the \x level, and make sure it cascades down. What are you trying to do with the account? Are you accessing a folder outside the wwwroot level?

Brian
 
Old September 15th, 2004, 09:42 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

bmains,
I made both ASP.NET Account and IUSER account Full control for specific folder and root folder but I still get access denied. What can be the problem???
Thanks.

 
Old September 15th, 2004, 10:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Since your NOT using impersonation, I expect that the user that needs access to the folder is the user that is logged into the system

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old September 15th, 2004, 10:15 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hal Levy,
I am the admin and Admin has "Full Control" for the root folder and pix folder.
ASP.NET & IUSER account also has "Full Control". What can be the problem?

My application successfuly uploads photos to the pix folder with default setting but when I try to delete specific photos from pix folder I get this System.UnauthorizedAccessException: Access to the path "E:\Inetpub\wwwroot\x\Pix\" is denied error.

Please someone help me. It's been 7 days and I can't figure it out.


 
Old September 15th, 2004, 10:22 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Have you checked the IIS properties page "Write" checkbox? Not only do you need to have write permissions on the user(s) that are running the application, but the website or virtual directory must allow it.
 
Old September 15th, 2004, 10:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Also check the rights on the file itself... you could find that the rights didn't trickle down to the file properly.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old September 15th, 2004, 01:28 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you using Windows Server 2003 with IIS 6? If so, the account that ASP.NET uses is the Network Service account and not the ASPNET account.
Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Track 7 by DJ Shadow (Track 7 from the album: Entroducing) What's This?
 
Old September 18th, 2004, 04:09 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using Windows 2000 server. I tried all of the above. What can be overlooked?






Similar Threads
Thread Thread Starter Forum Replies Last Post
(0x800A0046) Permission denied,not IIS permission! David Hay Classic ASP Basics 3 April 30th, 2006 10:47 PM
ASP Database Connection-File permission problem goljazoran Classic ASP Databases 4 November 29th, 2003 05:09 PM
ASP Database Connection-File permission problem goljazoran BOOK: Beginning ASP 3.0 0 November 10th, 2003 10:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.