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

Physical and shared folder's paths

4 Answers 69 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 2
Allan asked on 04 Mar 2011, 06:31 PM

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.



4 Answers, 1 is accepted

Sort by
0
Allan
Top achievements
Rank 2
answered on 04 Mar 2011, 07:16 PM
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


0
Dobromir
Telerik team
answered on 09 Mar 2011, 03:48 PM
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!
0
pooja
Top achievements
Rank 1
answered on 13 Feb 2012, 11:25 AM
How can i preview the image in this
0
Dobromir
Telerik team
answered on 13 Feb 2012, 01:49 PM
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 >>
Tags
FileExplorer
Asked by
Allan
Top achievements
Rank 2
Answers by
Allan
Top achievements
Rank 2
Dobromir
Telerik team
pooja
Top achievements
Rank 1
Share this question
or