Using a physical path

7 posts, 0 answers
  1. Tom
    Tom avatar
    34 posts
    Member since:
    Jun 2009

    Posted 21 Jul 2010 Link to this post

    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;
        }
     
    }
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Jul 2010 Link to this post

    Hello Christian,


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


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tom
    Tom avatar
    34 posts
    Member since:
    Jun 2009

    Posted 22 Jul 2010 Link to this post

    Yes, that's where I got this code from but it doesn't seem to work.
  5. Tom
    Tom avatar
    34 posts
    Member since:
    Jun 2009

    Posted 22 Jul 2010 Link to this post

    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>
  6. Tom
    Tom avatar
    34 posts
    Member since:
    Jun 2009

    Posted 22 Jul 2010 Link to this post

    Never mind, I figured it out.
  7. Brad
    Brad avatar
    7 posts
    Member since:
    Jun 2011

    Posted 21 Jul 2011 Link to this post

    What was the issue?
  8. Mark
    Mark avatar
    8 posts
    Member since:
    Nov 2012

    Posted 19 May 2014 Link to this post

    Hi can you tell me what you did to fix this as I have the same problem with the same bit of code.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017