Physical and shared folder's paths

5 posts, 0 answers
  1. Allan
    Allan avatar
    121 posts
    Member since:
    Jun 2008

    Posted 04 Mar 2011 Link to this post


    I am attempting to use the provided custom connector for physical and shared folder's paths. However, when I attempt to load the default page I recieve the following error:

    Line 310:    Public Overrides Function CheckReadPermissions(ByVal folderPath As String) As Boolean

    I modified my directories like so:

    Default.APSX.VB

    Partial Public Class _Default
        Inherits System.Web.UI.Page
      
        Protected Sub Page_Load(sender As Object, e As EventArgs)
            Dim viewPaths As String() = New String() {"C:\01-Admin", "\\Telerik.com\Path\SharedDir"}
      
            Dim uploadPaths As String() = New String() {"C:\01-Admin", "\\Telerik.com\Path\SharedDir"}
      
            Dim deletePaths As String() = New String() {"C:\01-Admin", "\\Telerik.com\Path\SharedDir"}
      
            RadFileExplorer1.Configuration.ViewPaths = viewPaths
            RadFileExplorer1.Configuration.UploadPaths = uploadPaths
            RadFileExplorer1.Configuration.DeletePaths = deletePaths
    RadFileExplorer1.Configuration.SearchPatterns = New () {"*.*"}
            RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
        End Sub
        
    End Class


    MappingFile.mapping

    <?xml version="1.0" encoding="utf-8" ?>
    <CustomFileBrowserProvider>
      <Paths>
        <genericHandlerPath>FileSystemHandler.ashx</genericHandlerPath>
      </Paths>
      <Mappings>
        <Mapping>
          <PhysicalPath>
            <![CDATA[C:\01-Admin]]>
          </PhysicalPath>
          <VirtualPath><![CDATA[MyCusomRootDir 1/]]></VirtualPath>
        </Mapping>
        <Mapping>
          <PhysicalPath>
            <![CDATA[\\Telerik.com\Path\SharedDir]]>
          </PhysicalPath>
          <VirtualPath><![CDATA[MySharedRootDir/]]></VirtualPath>
        </Mapping>
      
      </Mappings>
    </CustomFileBrowserProvider>

    Any help much apprciated.



  2. Allan
    Allan avatar
    121 posts
    Member since:
    Jun 2008

    Posted 04 Mar 2011 Link to this post

    I found the answer. I had to remove the overide on line 310 of the  CustomFileSystemProvider.vb


    Public Function CheckReadPermissions(ByVal folderPath As String) As Boolean
        Dim physicalTargetPath As String = Me.GetPhysicalFromVirtualPath(folderPath)
        If physicalTargetPath Is Nothing Then
            Return False
        End If
        Dim canRead = CheckPermissions(physicalTargetPath, PathPermissions.Read)
        Return canRead
    End Function


  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 09 Mar 2011 Link to this post

    Hi Allan,

    The CheckReadPermissions() method was added to the FileBrowserContentProvider in version 2010.2.286, so I assume you are using earlier version. The solution for such cases is to remove the overrides of methods that does not exist.

    All the best,
    Dobromir
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. pooja
    pooja avatar
    3 posts
    Member since:
    Nov 2010

    Posted 13 Feb 2012 Link to this post

    How can i preview the image in this
  6. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 13 Feb 2012 Link to this post

    Hi Pooja,

    I am not quite sure  I understand your question, or at least how it is related to the current topic.

    In order to enable the image preview dialog of RadFileExplorer you need to set EnableOpenFile property to True.

    Greetings,
    Dobromir
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017