I am using the rad editor and i need the use the docuement manager in the editor.
I want to path like this one \\Telerik.com\Path\SharedDir\ROOT\Folder_1\
If run my share drive trought run in windows i have acces not problem.
When i use it in the editor and click on the document manager there nothing showing!
What i am missing?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim viewPaths As String() = New String() {"C:\PhysicalSource\ROOT", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
Dim uploadPaths As String() = New String() {"C:\PhysicalSource\ROOT\CanUpload", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
Dim deletePaths As String() = New String() {"C:\PhysicalSource\ROOT\Folder_1\CanDelete", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
End Sub
In asp
<telerik:RadEditor ID="RadEditor1" runat="server">
</telerik:RadEditor>
5 Answers, 1 is accepted
1) You can test the permissions using the code provided in the An error like "... because the application did not have enough permissions..." occurs only in a production environment. How to debug the issue? section of this article: Troubleshooting.
2) Have you made the needed changes to the MappingFile.mapping file as shown in this article: Use RadFileExplorer with physical and shared folder's paths?
Kind regards,
Rumen
the Telerik team
Tks for the quick reply!
I i will test the permission!
If i try to map with the folling code
I get an error on this line RadFileExplorer1.Configuration.SearchPatterns = New () {"*.*"}
Type excepeted
One question :
Dim deletePaths As String() = New String() {"C:\PhysicalSource\ROOT\Folder_1\CanDelete", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\CanDelete"}
This line i need to change this part C:\PhysicalSource\ROOT\Folder_1\CanDelete to my drive on the server for the ?
Tks
Luc
I try this to check for the persmission!
When i run my page on the server i don't get any error, but the file TestFile1.txt is not created on the server?
Any idea?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim paths As String() = New String() {"E:\xxx\xxx\documentpartager", "\\xxx@SSL\DavWWWRoot\xxx\xxx\SGLD\documentpartager"} ' Path to test
'RadFileExplorer1.Configuration.ViewPaths = paths;
'RadFileExplorer1.Configuration.DeletePaths = paths;
'RadFileExplorer1.Configuration.UploadPaths = paths;
FullPermissionsTest(Server.MapPath(paths(0))) ' Pass physical path
End Sub
''' <summary>
''' Full permission test
''' </summary>
''' <param name="testPhysicalPath">Physical path</param>
''' <remarks></remarks>
Private Sub FullPermissionsTest(ByVal testPhysicalPath As String)
Try
Dim physicalPathToTestFolder As String = System.IO.Path.Combine(testPhysicalPath, "TestDirectory")
Dim testDir As System.IO.DirectoryInfo = System.IO.Directory.CreateDirectory(physicalPathToTestFolder) 'Create folder
testDir.GetDirectories() ' List folders
Dim testFilePath As String = System.IO.Path.Combine(testDir.FullName, "TestFile1.txt") ' test file paths
System.IO.File.Create(testFilePath).Close() ' Create a file
testDir.GetFiles("*.*") ' List files
System.IO.File.OpenRead(testFilePath).Close() ' Open a file
'System.IO.File.Delete(testFilePath) ' delete the test file
'System.IO.Directory.Delete(physicalPathToTestFolder) ' delete the test folder
Catch ex As Exception
' Show the probelm
Dim message As String = ex.Message
Dim script As String = String.Format("alert('{0}');", message.Replace("'", """"))
ScriptManager.RegisterStartupScript(Me.Page, Me.Page.[GetType](), "KEY", script, True)
End Try
End Sub
Straight to the issues:
- I get an error on this line RadFileExplorer1.Configuration.SearchPatterns = New () {"*.*"}
Type excepeted
The error message is pretty self explanatory - the type declaration of the newly created array is missing:
RadFileExplorer1.Configuration.SearchPatterns =
New
String
() {
"*.*"
}
- I am not quite sure why you are able to run the provided code snippet without receiving any errors. The following line should throw an exception:
FullPermissionsTest(Server.MapPath(paths(0)))
FullPermissionsTest(paths(0))
Correct me if I am wrong but I believe the both paths set to the RadFileExplorer point to the same folder, where the first value is the path pointing to the Mapped Network Drive and the second value is the actual network path. If this is the case, you do not need to have both paths set but you need to add the mapping in the mapping file (MappingFile.mapping located in the App_Code folder). Here is how the new declaration should look:
<
Mapping
>
<
PhysicalPath
>
<![CDATA[\\xxx@SSL\DavWWWRoot\xxx\xxx\SGLD\documentpartager]]>
</
PhysicalPath
>
<
VirtualPath
>
<![CDATA[MyCusomRootDir 1/]]>
</
VirtualPath
>
</
Mapping
>
Greetings,
Dobromir
the Telerik team