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

Renaming and deletion not working

4 Answers 105 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Muhammad Farjad
Top achievements
Rank 1
Muhammad Farjad asked on 09 May 2010, 09:47 AM

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

4 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 11 May 2010, 12:13 PM
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.
0
Muhammad Farjad
Top achievements
Rank 1
answered on 11 May 2010, 01:40 PM
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
0
Accepted
Fiko
Telerik team
answered on 13 May 2010, 01:22 PM
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.
0
Muhammad Farjad
Top achievements
Rank 1
answered on 13 May 2010, 08:46 PM
Thanks a lot Fiko :-)
Tags
FileExplorer
Asked by
Muhammad Farjad
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Muhammad Farjad
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or