Renaming and deletion not working

5 posts, 1 answers
  1. Muhammad Farjad
    Muhammad Farjad avatar
    13 posts
    Member since:
    Apr 2010

    Posted 09 May 2010 Link to this post

    Hi,

    I am having a problem using File Explorer. Uploading works fine but when I try to rename or delete any file or folder, an error pops up saying that "The selected file could not be deleted because the application did not have enough permissions...".

    I have gone through the earlier posts in forums regarding this problem but could not get to find out the solution. I am using ASP.NET AJAX Q3 2009 SP2 version and the declarations of file explorer in my codes are as follow:

    > in .aspx

    <telerik:RadFileExplorer ID="fileExplorer" runat="server" 
    DisplayUpFolderItem="True" 
    EnableCopy="True" Skin="Windows7" 
    OnClientLoad="OnClientLoad" 
    Configuration-MaxUploadFileSize="2000000000" 
    Width="524px" TreePaneWidth="150px">  
    </telerik:RadFileExplorer> 

    > in .aspx.cs
    protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
            {  
                string[] searchPatterns = new string[1];  
                searchPatterns[0] = "*.*";  
                fileExplorer.Configuration.SearchPatterns = searchPatterns;  
     
                string[] paths = new string[1];  
                paths[0] = "~\\Root\\" + (string)Session["userName"];  
     
                fileExplorer.Configuration.ViewPaths = paths;  
                fileExplorer.Configuration.UploadPaths = paths;  
                fileExplorer.Configuration.DeletePaths = paths;  
            }  
        } 

    Kindly suggest me a simple solution to sort this problem out. Thanks

    Regards
    Muhammad Farjad
  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 11 May 2010 Link to this post

    Hi Muhammad,

    I recommend you to check the permissions granted to the ASP.NET account and the IIS User account to this folder.

    Kind regards,
    Petio Petkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Muhammad Farjad
    Muhammad Farjad avatar
    13 posts
    Member since:
    Apr 2010

    Posted 11 May 2010 Link to this post

    Hi Petio,

    The permissions are ok, problem occurs only when I try to configure the paths in code behind file, but if I configure the paths at the time of declaration in aspx file like

    <telerik:RadFileExplorer ID="fileExplorer" runat="server" DisplayUpFolderItem="True" EnableCopy="True" Skin="Windows7" 
    OnClientLoad="OnClientLoad" Configuration-MaxUploadFileSize="2000000000" 
    Width="524px" TreePaneWidth="150px">  
     
    <Configuration ViewPaths="~/Root/farjad" UploadPaths="~/Root/farjad" DeletePaths="~/Root/farjad" /> 
     
    </telerik:RadFileExplorer> 

    then every thing works fine i.e. uploading, renaming and deletion. I am looking forward to your help.

    Regards
    Muhammad Farjad
  5. Answer
    Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 13 May 2010 Link to this post

    Hello Muhammad,

    I have already answered your support ticket. For convenience I have paste it here as well:

    "The message which is shown is expected, because the default FileBrowserContentProvider used in RadFileExplorer works with virtual paths only that can be resolved using Server.MapPath method. The paths set in the markup are correct virtual path and they can be resolved by the mentioned method, but the paths set in code behind are incorrect. Please check the differences outlined here:

    ASPX:
    ViewPaths="~/Root/farjad"
    UploadPaths="~/Root/farjad"
    DeletePaths="~/Root/farjad"

    C#:
    paths[0] = "~\\Root\\" + (string)Session["userName"];


    You need to change the path in C# code to:
    paths[0] = "~/Root/" + (string)Session["userName"];
    "


    Kind regards,
    Fiko
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Muhammad Farjad
    Muhammad Farjad avatar
    13 posts
    Member since:
    Apr 2010

    Posted 13 May 2010 Link to this post

    Thanks a lot Fiko :-)
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017