[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error: System.UnauthorizedAccessException: Access to the path...

Posted on 2005-05-02
14
Medium Priority
?
382 Views
Last Modified: 2008-02-01
I have purchased a asp script that automatically resizes images that have been uploaded to the server. The image uploads to the server with no problems. But when the new script I purchase tries to access the script I get this error:

Error: System.UnauthorizedAccessException: Access to the path "D:\CSI Web Sites\cfsvending.com\new\employee\images\test.jpg" is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.File.Delete(String path) at _ASP.ResizeImage_aspx.Page_Load(Object s, EventArgs e)

This script has great reviews and several comments from people saying that it works flawlessly. So I have to believe it is a permission problem somewhere. Any help would be greatly appreciated. I consider this to be very urgent as I'm trying to finish up this project for a client by a deadline that we have committed to.
0
Comment
Question by:Tritorian
  • 5
  • 4
  • 4
  • +1
14 Comments
 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13910436
D:\CSI Web Sites\cfsvending.com\new\employee\images
IUSR_<computer Name> has to have permission to delete from this directory
0
 
LVL 6

Expert Comment

by:iscode
ID: 13910460
right click on the folder
D:\CSI Web Sites\cfsvending.com\new\employee\images\

click on the security tab, and give the account your application is running under write permissions.
0
 

Author Comment

by:Tritorian
ID: 13910915
Neither of those worked. I have set the IUSER account to have Modify, Read & Execute, List Folder Contents, Read, and Write. I also gave ASPNET user the same attributes.  Any other suggestions?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13910930
well I would say seeing as how you purchases the script ... I would ask for customer support on the application
0
 

Author Comment

by:Tritorian
ID: 13910966
Well I have and not getting a response yet. That's why I came here and offered a lot of points for help...
0
 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13910979
ok, well sorry I cannot help more, you may want to try adding a link in the ASP.NET category to this question.  They may be more familiar with this error.

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/
0
 

Author Comment

by:Tritorian
ID: 13911043
Ok, well thanks for the effort. I'm not sure how to close the question out. Maybe a moderator will see it?
0
 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13911060
http://www.experts-exchange.com/Community_Support/

post a question here asking to close out and provide a link, but again you may want to just post a pointer question in that topic area (ASP_DOT_NET) and get the feedback here, but it is up to you.  

Good luck
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 13911517
before you close it try to change/add  IWAM_<machinename>, add all necessary privilages to it and you should be good go
0
 
LVL 13

Accepted Solution

by:
davidlars99 earned 2000 total points
ID: 13911572
this is more likely to solve your problem


1. right click on "My Computer" and select "Manage"
2. in the next window expand "Services and Application"
3. then expand "Internet Information Services" and find directory where you ASP file is located (one that resizes images)
4. right click on that ASP file and select "Properties", you're gonna see dialog window with few tabs
5. in the first tab window check "Read", "Write" properties
6. now navigate to "File Security" tab and click on "Edit", when dialog window opens there's gonna be another "Edit" (first one) button click on that too
7. in the next window you'll see IUSR_<machinename> followed by "Browse" button, click on that and choose the user which you think has rights for your needs, enter password and check off "Allow IIS to control Password"
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 13911609
I had similar error --> System.UnauthorizedAccessException <-- with ASP.NET app, where I was changing some file's properties and I had to use impersonation and that solved my problem, so my second workaround should execute that particular ASP page under some admin account

0
 

Author Comment

by:Tritorian
ID: 13911839
That worked, thanks a lot!
0
 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13911844
glad that worked =)  nice catch david
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 13911929
thanks TSU, I'm glad too...  :)  

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question