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

Use RadFileExplorer with physical folder

5 Answers 196 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 01 Nov 2010, 03:20 AM
I need to put the file upload folder outside my website folder, so I implement RadFileExplorer with physical and shared folder's paths according to the following post. The RadFileExplorer control is loaded, but all function buttons (New folder, delete and upload...) are not clickable (greyed out). Is it related to folder permissions? Can you help? Thanks.

http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx

5 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 03 Nov 2010, 10:37 AM
Hello Stephen,

You need to set DeletePaths and UploadPaths properties as well in order to enable the commands.

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
Stephen
Top achievements
Rank 1
answered on 03 Nov 2010, 11:50 AM
I did set the delete and upload path. My code is as following. Anything wrong? Many thanks.

aspx:
<telerik:radfileexplorer runat="server" id="FileExplorer1" width="560px" height="520px" treepanewidth="180px" onclientfileopen="OnClientFileOpen">
<Configuration searchpatterns="*.*" maxuploadfilesize="31457280" />
</telerik:radfileexplorer>

aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
        string[] viewPaths = new string[] { @"\\xxxxxxxxxx\client\fileupload\Files" };
        string[] uploadPaths = new string[] { @"\\xxxxxxxxxx\client\fileupload\Files" };
        string[] deletePaths = new string[] { @"\\xxxxxxxxxx\client\fileupload\Files" };
 
        FileExplorer1.Configuration.ViewPaths = viewPaths;
        FileExplorer1.Configuration.UploadPaths = uploadPaths;
        FileExplorer1.Configuration.DeletePaths = deletePaths;
        FileExplorer1.Configuration.SearchPatterns = new[] { "*.*" };
        FileExplorer1.Configuration.ContentProviderTypeName = typeof(CustomFileSystemProvider).AssemblyQualifiedName;
    }
0
Fiko
Telerik team
answered on 08 Nov 2010, 03:44 PM
Hi Stephen,

your configuration is correct and if you set the right configuration in the mapping file (as described in the KB article), then you should not experience any problems. In case that you have all the settings already applied in the mapping file then the problem comes from the fact that the CheckWritePermission (FileSystem.cs file)
public static bool CheckWritePermission(string physicalTargetPath, string virtualTargetPath)
{
        FileIOPermission f = new FileIOPermission(FileIOPermissionAccess.Write, physicalTargetPath);
        try
        {
            f.Demand();
            return true;
        }
        catch (SecurityException)
        {
            return false;
        }
}

returns false. This means that you do not have write permissions set to the shared directory. Could you please check this on your side?

All the best,
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
Stephen
Top achievements
Rank 1
answered on 08 Nov 2010, 07:49 PM
Yes, that's exactly what I got in the FileSystem.cs. How can I set the write permission on the shared folder? Thanks.
0
Fiko
Telerik team
answered on 11 Nov 2010, 10:59 AM
Hi Stephen,

I believe that this links will be of help for you:

All the best,
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
Tags
General Discussions
Asked by
Stephen
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or