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

Thread is closed for posting
5 posts, 0 answers
  1. Shinee
    Shinee avatar
    14 posts
    Member since:
    Aug 2010

    Posted 03 Oct 2011 Link to this post

    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\DIR1\
    DIR2
    \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\DIR1\DIR2\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

  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 03 Oct 2011 Link to this post

    Hello Shinekhuu,

    Do you have Write permissions allowed on the folder you're trying to upload the files to? That appears to be the reason why you get this error.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinee
    Shinee avatar
    14 posts
    Member since:
    Aug 2010

    Posted 03 Oct 2011 Link to this post

    Hi, thanks Kevin.
    I though this is not causing from Dir2's permission
    because error message is

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


    Why bgr.png (it's the file name which I have just tried to upload) is denied? Isn't it should be :

    Access to the path 'C:\inetpub\wwwroot\Test2\News\File\images\DIR1\DIR2' is denied.

    if it's causing because of dir2's permission?
    Thanks
    PS: I gave 777 permission to dir1, dir 2 and containing folders
  5. Shinee
    Shinee avatar
    14 posts
    Member since:
    Aug 2010

    Posted 03 Oct 2011 Link to this post

    SOLVED
    IIS--> appool --> Advanced settings --> LocalSystems OK :D
  6. <span>w</span>
    <span>w</span> avatar
    84 posts
    Member since:
    Jun 2012

    Posted 19 Oct 2012 Link to this post

    Hi I am trying to upload File by using RadUpload. Its work on local pc as well as on Server. But on our one client pc (Window 7). it cause error. I am 100 % sure about my code. Its working great. Is there any permission or what is this?

    Could not find a part of the path 'D:\Testing\Test.pdf'.
    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.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Testing\Test.pdf'.

    [DirectoryNotFoundException: Could not find a part of the path 'D:\Testing\Test.pdf'.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +216
       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, Boolean useLongPath) +2481
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +229
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017