This is a migrated thread and some comments may be shown as answers.

Radeditor "Access to the path *** is denied. Permission issue

4 Answers 364 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shinee
Top achievements
Rank 1
Shinee asked on 03 Oct 2011, 12:35 PM
Hello there.
I am using RadUpload and It is working correctly now, but occuring this error when I clicking on UPLOAD button in rad image manager or rad document manager.
What should I do?
To make my issue clearly:

I am going to upload my file to Dir1/Dir2/uploadingimage.gif
I have dir1 directory.
I will create dir2 directory from my C# code behind.
I am selecting uploadingimage.gif and click upload button.
Then I am having this error.

Server Error in '/' Application.

Access to the path 'C:\inetpub\wwwroot\Test2\News\File\images\001\pu001021020\bgr.png' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\Test2\News\File\images\001\pu001021020\bgr.png' 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 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\Test2\News\File\images\001\pu001021020\bgr.png' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +10546931
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +2580
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
   System.IO.FileStream..ctor(String path, FileMode mode) +91
   System.Web.HttpPostedFile.SaveAs(String filename) +151
   Telerik.Web.UI.PostedFile.SaveAs(String fileName, Boolean overwrite) +54
   Telerik.Web.UI.Widgets.FileSystemContentProvider.StoreFile(UploadedFile file, String path, String name, String[] arguments) +120
   Telerik.Web.UI.RadFileExplorer.ProcessUploadedFiles() +959
   Telerik.Web.UI.RadFileExplorer.OnLoad(EventArgs e) +169
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

4 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 05 Oct 2011, 06:57 PM
Hi Shinekhuu,

Could you please verify that the application actually have write permissions to the pointed directory?

As the provided error message states:
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.

Please make sure the the correct user accounts have the proper permissions to folder where the files should be uploaded.

Regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Shinee
Top achievements
Rank 1
answered on 06 Oct 2011, 02:51 AM
Hi, this issue has been fixed.
IIS--> Apppool-->myapplication pool--> advanced settings--> Localsystems
OK
:D
Thanks
0
Nate
Top achievements
Rank 1
answered on 14 Dec 2012, 04:10 PM
So, how about a hosted scenario... like Godaddy hosting?
0
Vessy
Telerik team
answered on 19 Dec 2012, 11:21 AM
Hi Nate,

Unfortunately we are not able to be of any help regarding the hosting issues. I could only suggest you to contact the Godaddy hosting's support and to see whether they could turn you to a possible way to fix the issue.

Regards,
Vesi
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Shinee
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Shinee
Top achievements
Rank 1
Nate
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or