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

Using a physical path

6 Answers 496 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
WCRA Dev
Top achievements
Rank 1
WCRA Dev asked on 21 Jul 2010, 09:58 PM
From reading this forum it looks like the code below should allow me to use a physical path for the RadFileExplorer but instead I get this error message:  'C:/Test2' is a physical path, but a virtual path was expected.

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        string[] viewPaths = new string[] { @"C:\Test2", @"\\CHRISTIAN_KING2\Test1" };
 
        RadFileExplorer1.Configuration.ViewPaths = viewPaths;
    }
 
}

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Jul 2010, 01:21 PM
Hello Christian,


Please check the KB Article which shows how to use RadFileExplorer with physical and shared folder's paths.
Knowledge Base


-Shinu.
0
WCRA Dev
Top achievements
Rank 1
answered on 22 Jul 2010, 02:00 PM
Yes, that's where I got this code from but it doesn't seem to work.
0
WCRA Dev
Top achievements
Rank 1
answered on 22 Jul 2010, 02:12 PM
Here is the modifications I made to the MappingFile.mapping file.  Is the name MyCusomRootDir or MySharedRootDir supposed to be reference somewhere?


<?xml version="1.0" encoding="utf-8" ?>
<CustomFileBrowserProvider>
  <Paths>
    <genericHandlerPath>FileSystemHandler.ashx</genericHandlerPath>
  </Paths>
  <Mappings>
    <Mapping>
      <PhysicalPath>
        <![CDATA[C:\Test1]]>
      </PhysicalPath>
      <VirtualPath><![CDATA[MyCusomRootDir 1/]]></VirtualPath>
    </Mapping>
    <Mapping>
      <PhysicalPath>
        <![CDATA[\\CHRISTIAN_KING2\Test1]]>
      </PhysicalPath>
      <VirtualPath><![CDATA[MySharedRootDir/]]></VirtualPath>
    </Mapping>
 
  </Mappings>
</CustomFileBrowserProvider>
0
WCRA Dev
Top achievements
Rank 1
answered on 22 Jul 2010, 02:31 PM
Never mind, I figured it out.
0
Brad
Top achievements
Rank 1
answered on 21 Jul 2011, 08:39 PM
What was the issue?
0
Mark
Top achievements
Rank 1
answered on 19 May 2014, 03:34 PM
Hi can you tell me what you did to fix this as I have the same problem with the same bit of code.
Tags
FileExplorer
Asked by
WCRA Dev
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
WCRA Dev
Top achievements
Rank 1
Brad
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Share this question
or