Can upload files via RadFileExplorer, but cannot create, delete, or rename folders or files in directory

25 posts, 0 answers
  1. Jeff Adkisson
    Jeff Adkisson avatar
    6 posts
    Member since:
    Dec 2007

    Posted 02 Apr 2009 Link to this post

    I am having trouble modifying files via RadFileExplorer. 


    I can see my trees and I can upload files no problem. However, I cannot delete files or folders and I cannot rename files or folders. 

    Whenever I try a delete or rename operation on a file, I get this popup:
    The selected file could not be deleted because the application did not have enough permissions.

    When I try to create a new folder, I get this popup:
    The selected folder could not be created because the application did not have enough permissions.

    I have granted the ASP.NET user full rights to the folders and files in question. I can see that the ASP.NET user is the owner of the files I am uploading, so that should be the right user. That didn't work, so I explicitly granted full rights to myself and Everyone just to see if that would fix it... no luck.

    My environment is IIS 5 on XP SP3. My ASP.NET application is setup to use Windows authentication.

    This is clearly a security issue, but I don't see what I am missing. Please advise.

    Thanks - Jeff




  2. Shaun Peet
    Shaun Peet avatar
    569 posts
    Member since:
    Aug 2004

    Posted 03 Apr 2009 Link to this post

    Sorry for suggesting the obvious first, but are the DeletePaths set?

  3. Jeff Adkisson
    Jeff Adkisson avatar
    6 posts
    Member since:
    Dec 2007

    Posted 03 Apr 2009 Link to this post

    Yes. They are all three set to the same value.

    Thanks - Jeff

  4. Shaun Peet
    Shaun Peet avatar
    569 posts
    Member since:
    Aug 2004

    Posted 03 Apr 2009 Link to this post

    Are you able to do any file manipulation outside of the RadFileExplorer?  Ie:  Create a page that opens a file within the file system, renames it, and saves it?

  5. Jeff Adkisson
    Jeff Adkisson avatar
    6 posts
    Member since:
    Dec 2007

    Posted 03 Apr 2009 Link to this post

    Yes... I can do all of that via standard File. and Directory. commands.

    I've since dropped the control and wrote my own using the tree control and the upload control. Works well... not as full featured as your control, but I'm having no issues.

    I'll try it again on my next project.

    Thanks - Jeff

  6. Lini
    Admin
    Lini avatar
    2143 posts
    Member since:
    Sep 2012

    Posted 06 Apr 2009 Link to this post

    Hello Jeff,

    The errors you saw are displayed either if the ASP.NET process fails to perform the disk operation (e.g. not enough permissions for Directory.Create()) or if the path you are trying to modify is not part of the UploadPaths/DeletePaths collections from the FileExplorer configuration. As you already said, the file system permissions have been set correctly, so this leaves the paths in the configuration.

    If possible, try upgrading to the latest build (2009.1.402) or send us a sample project that shows this problem so we can investigate further.

    Kind regards,
    Lini
    the Telerik team


    Check out Telerik Trainer , the state of the art learning tool for Telerik products.

  7. vikas
    vikas avatar
    4 posts
    Member since:
    Jul 2012

    Posted 06 Apr 2009 Link to this post

    Hi 

     I am facing problem to hide or disable the delete,rename option in RadFileExplorer control. I want to hide these two option.

    Please help me.

    Regards
    vikas goel

  8. Fiko
    Admin
    Fiko avatar
    1406 posts
    Member since:
    May 2014

    Posted 06 Apr 2009 Link to this post

    Hello Vikas,

    You can achieve this behavior by adding the following code in the codebehind :

     This part of the code removes the "Rename" and "Delete" menus from the grid's context menu :

    RadFileExplorer1.GridContextMenu.Items.RemoveAt(1); 
    RadFileExplorer1.GridContextMenu.Items.RemoveAt(1); 

    This part of the code removes the "Rename" and "Delete" menus from the RadTreeView - on the left of the RadFileExplorer object.
    RadFileExplorer1.TreeView.ContextMenus[0].Items.RemoveAt(0); 
    RadFileExplorer1.TreeView.ContextMenus[0].Items.RemoveAt(0); 

    And the following part of the code removes the "Delete" command from the RadToolBar on the top of the RadFileExplorer object :

    RadFileExplorer1.ToolBar.Items.RemoveAt(5); 

    I hope this helps.

    Regards,
    Author nickname
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.

  9. Michael Dunbar
    Michael Dunbar avatar
    129 posts
    Member since:
    Sep 2007

    Posted 28 Apr 2009 Link to this post

    Did this ever get solved?

    I am using the latest version of Telerik, Vista running IIS 6 and have the same issue. I can't rename, delete or move files.

    I've set all 3 paths in the config and granted the ASP.NET user full control of the folder and the root folder of my demo site I set up to test this control. I get a pop up dialogue advising me the application doesn't have permissions and to contact an admin.

    Is there another user I need to grant access/permissions on the folder?

  10. Lini
    Admin
    Lini avatar
    2143 posts
    Member since:
    Sep 2012

    Posted 29 Apr 2009 Link to this post

    Hello,

    If your web application is using impersonation, then you will need to grant the appropriate permissions to the current user. Otherwise you need to grant read/write permissions to the user, which IIS uses to run your web application (e.g. the application pool identity, network service).

    We have not heard anything from Jeff (the original poster) so we are not sure if the problem was resolved in build 2009.1 402 or if it was in his web site configuration.

    A couple suggestions - if you have disabled the ViewState of the FileExplorer control, please enable it again. This has been known to cause problems with the control. Also, see if your application runs OK under the ASP.NET development web server from Visual Studio.

    Kind regards,
    Lini
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  11. Jeff Adkisson
    Jeff Adkisson avatar
    6 posts
    Member since:
    Dec 2007

    Posted 29 Apr 2009 Link to this post

    I'm still here... I had to move on after a few days, so I gave up and wrote a clone. I never got the RAD File Explorer working in our product. I built my clone using the same RAD controls that make up the File Explorer... works great.

    The control works fine in the demos, but I had no success getting working reliably when using Windows authentication. While working with it, I pretty much granted full authority to anything and everything to see if I could locate what was hanging up the control... never fixed it.

    I'd love to use the control in the future, so perhaps someone will figure out what I'm overlooking.

    Perhaps you could create a demo that uses Windows authentication, NTFS, etc. to show how to work with the control in that environment.

    Regards - Jeff

  12. Lini
    Admin
    Lini avatar
    2143 posts
    Member since:
    Sep 2012

    Posted 05 May 2009 Link to this post

    Hi Jeff,

    Whether your site is using Forms authentication or Windows authentication without impersonation should not matter - the same account (Network Service by default) is used to access resources from the site. If this account has read/write permissions on the physical application files, the file explorer should work.

    If you are using windows authentication with impersonation, then the application users will also need to have read/write permissions on the folders, because the server will use their identity to perform operations and access resources.

    Finally, your application must be running under Medium trust or higher. Lower trust levels do not allow reading/writing files in the application folder. If you must run your application in a low trust level, then we suggest that you add the Telerik.Web.UI assembly to the server's GAC. This way it will run in Full trust, while the rest of the application will run under your trust level. This will allow the FileExplorer control to work properly.

    Greetings,
    Lini
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  13. Dheeraj
    Dheeraj avatar
    6 posts
    Member since:
    Apr 2009

    Posted 04 Jun 2009 Link to this post

    Guys, faced the same problem.

    To our surprise, the file explorer was able to do all things i.e. Creating/Deleting/Uploading when we set the config at design time, but doing the same from codebehind gave the same error. "Don't have enough premissions".

    We were setting the config values like this:

    If (!IsPostback)
    {
                radMyDocuments.InitialPath = "/UserFiles/AccountID_1/UserID_1/My Documents";

                string[] DocPaths = new string[] { radMyDocuments.InitialPath };
                radMyDocuments.Configuration.ViewPaths = DocPaths;
                radMyDocuments.Configuration.DeletePaths = DocPaths;
                radMyDocuments.Configuration.UploadPaths = DocPaths;
    }

    We removed the check If IsPostback and it started working fine ...

    Hope it helps someone....

  14. Lini
    Admin
    Lini avatar
    2143 posts
    Member since:
    Sep 2012

    Posted 04 Jun 2009 Link to this post

    Hi Dheeraj,

    I think the problem was caused by disabled ViewState on the RadFileExplorer control. You should not set EnableViewState="false" for the file explorer, because it will not be able to remember its configuration between postbacks. The problems you will encounter are likely to be "not enough permissions" - the control will block all file operations because the UploadPaths, DeletePaths will be empty after a postback.

    Greetings,
    Lini
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  15. Dheeraj
    Dheeraj avatar
    6 posts
    Member since:
    Apr 2009

    Posted 05 Jun 2009 Link to this post

    Ok, Let me try the suggestion and get back. Though i don't remember setting Viewstate to false myself. Is it set to not use viewstate by default? Anyways, will get back soon...

  16. Jay Mathis
    Jay Mathis avatar
    28 posts
    Member since:
    Oct 2004

    Posted 07 Jul 2009 Link to this post

    I can confirm that this is still a problem in the latest Q2 release.

    If I set the paths declaritively using the design time UI, it works fine.   If I set it in the Page_Load event, it will let me upload and create folders, but not rename or delete.

     

    I have EnableViewState= true

    i have also tried to set the paths in the Init event for the control and the page with no luck.  It only seems to work if the paths are declaritively set.

  17. Jay Mathis
    Jay Mathis avatar
    28 posts
    Member since:
    Oct 2004

    Posted 07 Jul 2009 Link to this post

    I was able to solve my issue.

    I has been forming the path like this:

     

     

    Dim sPath = System.IO.Path.Combine(System.IO.Path.Combine(PortalSettings.HomeDirectory, "ReitDocs"), _ReitID.ToString)  
     

    which was giving a string like this:

    /Portals/0/ReitDocs\475

    Apparantly, the "\" before the 475 is what caused the issue.

    I changed the constructor to be like this:

    Dim sPath = System.IO.Path.Combine(PortalSettings.HomeDirectory, "ReitDocs") + "/" + _ReitID.ToString 


    which yeilds:

    /Portals/0/ReitDocs/475

    and now all works fine...

     

  18. murugesan Ramalingam
    murugesan Ramalingam avatar
    1 posts
    Member since:
    Oct 2009

    Posted 09 Oct 2009 Link to this post

    i am having trouble in uploading photos in new folder in server side.
    pls help

  19. Fiko
    Admin
    Fiko avatar
    1406 posts
    Member since:
    May 2014

    Posted 14 Oct 2009 Link to this post

    Hello Murugesan,

    Could you please provide a little bit more information about the problem? It will be best if you open a new support ticket and send us a runnable project that reproduces the problem. We will check it and do our best to provide a solution.

    Regards,
    Fiko
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  20. John Stewart
    John  Stewart avatar
    7 posts
    Member since:
    Sep 2007

    Posted 03 Feb 2010 Link to this post

    I was having the problem where I could upload a file to a virtual directory pointing to a share on another computer but i could not move or delete existing files.  I had all my security set up with all possible permissions but could not fix the problem.  My deletepaths, viewpaths and upload paths were exact.  Here was the problem
    Here is a sample of how my paths were set:

    \imagelibraries\ministries\
    This allowed uploading but broke on deleting
    i changed them to

     

    /imagelibraries/ministries/



    Now everythign works....Hope this helps someone having the same issue as me.

  21. Amit Singh
    Amit Singh avatar
    3 posts
    Member since:
    Nov 2010

    Posted 29 Nov 2010 Link to this post

    Hi,
    I have read every post in this thread and tried it on my Control yet I am unable to Delete or rename Files/Folders, I can create New Folders though!!!
    I think the problem is with granting permissions... Can someone let me know how do I ensure the permissions are granted correctly?

    Awaiting reply....

  22. Fiko
    Admin
    Fiko avatar
    1406 posts
    Member since:
    May 2014

    Posted 02 Dec 2010 Link to this post

    Hi Amit,

    I recommend you to perform the suggested test in this thread. In case that the test does not show any error messages, could you please isolate the problem in a small runnable project, open a new support ticket and send it to me? I will debug it and do my best to provide a solution as soon as possible.

    Kind regards,
    Fiko
    the Telerik team

    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  23. Ismael
    Ismael avatar
    2 posts
    Member since:
    Nov 2011

    Posted 06 Dec 2011 Link to this post

    I had the same issue, the problem is caused because it creates an update panel and that fails with an error 405. it worked local but not on the server. look at this link http://forums.asp.net/t/1413496.aspx, fix it by adding this:

    <script language=javascript>

        Sys.Application.add_load(AppLoad);

        function AppLoad() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
            Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequest);
        }

        function BeginRequest(sender, args) {
            // Clear the error if it's visible from a previous request.
            if ($get('Error').style.visibility == "visible")
                CloseError();
        }

        function EndRequest(sender, args) {
            // Check to see if there's an error on this request.
            if (args.get_error() != undefined) {
                // If there is, show the custom error.
                $get('Error').style.visibility = "visible";

                // Let the framework know that the error is handled,
                //  so it doesn't throw the JavaScript alert.
                args.set_errorHandled(true);
            }
        }

        function CloseError() {
            // Hide the error div.
            $get('Error').style.visibility = "hidden";
        }
    </script>

  24. Ismael
    Ismael avatar
    2 posts
    Member since:
    Nov 2011

    Posted 06 Dec 2011 Link to this post

    i found the cause of my issue. if i looked at the page as http://myweb.com i can upload but cant delete, rename or move. if i look at it as http://myweb.com/Default.aspx the control behaved like is suppose to. I'll find a work around by not having the control in the default document page and this does not involve clearing the Ajax errors.
    If someone can try it out and see if this is a known issue, it'll be great if it gets fixed in a future version. i'm using a master page, don't know if this matters.

  25. Dobromir
    Admin
    Dobromir avatar
    1629 posts
    Member since:
    Sep 2012

    Posted 07 Dec 2011 Link to this post

    Hi Ismael,

    RadFileExplorer's functionality is heavily based on client-side callbacks and ajaxifying the control is not recommended. If you need to avoid postbacks when uploading file, I would recommend you to enable the async upload feature. To do this you need to set EnableAsyncUpload property of RadFileExplorer to true.

    Regarding the issue from your second post, if you have RadCompression enabled and you are using .NET 4.0, event handlers might not be raised in a default document in IIS 7 or IIS 7.5 Integrated Mode. Please try setting preCondition="managedHandler" and the runAllManagedModulesForAllRequests setting from your web.config for the RadCompression module.

    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

Back to Top