Contents
Licensing
Installation and deployment
RadControls for ASP.NET AJAX Fundamentals
RadControls
RadAjax
RadAsyncUpload
RadBarcode
RadButton
RadCalendar
RadCaptcha
RadChart
RadColorPicker
RadComboBox
RadDataPager
RadDock
RadEditor
RadFileExplorer
RadFilter
RadFormDecorator
RadGrid
RadHtmlChart
RadImageEditor
RadInput
RadListBox
RadListView
RadMenu
RadNotification
RadODataDataSource
RadOrgChart
RadPanelBar
RadRating
RadRibbonBar
RadRotator
RadScheduler
RadScriptManager
RadSitemap
RadSlider
RadSocialShare
RadSpell
RadSplitter
RadStylesheetManager
RadTabStrip
RadTagCloud
RadToolBar
RadToolTip
RadTreeList
RadTreeView
RadUpload
RadWindow
RadXmlHttpPanel
Visual Studio Extensions
Integrating RadControls in ASPNET MVC
Integrating RadControls in DNN
Integrating RadControls in Mono
Integrating RadControls in SharePoint
API Reference
For More Help
|
|
        RadControls for ASP.NET AJAX
This topic describes some of the possible issues with RadFileExplorer and how to deal with them
Upload or Delete commands are disabled
Make sure that UploadPaths or DeletePaths properties are set correctly
Setting a path to the InitialPath property does not select folder or file
Make sure that the path set to the property has the same format as the path shown in the RadFileExplorer's addressbar
An error like "... because the application did not have enough permissions..." occurs only in a production environment. How to debug the issue?
Remove the RadFileExplorer (or all RadControls) from the page
In the code behind of the same page where the RadFileExplorer was declared add this code:
CopyC# protected void Page_Load(object sender, EventArgs e)
{
string[] paths = new string[] { "~/RootDirectory1/" };
FullPermissionsTest(Server.MapPath(paths[0]));
}
private void FullPermissionsTest(string testPhysicalPath)
{
try
{
string physicalPathToTestFolder = System.IO.Path.Combine(testPhysicalPath, "TestDirectory");
System.IO.DirectoryInfo testDir = System.IO.Directory.CreateDirectory(physicalPathToTestFolder);
testDir.GetDirectories();
string testFilePath = System.IO.Path.Combine(testDir.FullName, "TestFile1.txt");
System.IO.File.Create(testFilePath).Close();
testDir.GetFiles("*.*");
System.IO.File.OpenRead(testFilePath).Close();
System.IO.File.Delete(testFilePath);
System.IO.Directory.Delete(physicalPathToTestFolder);
}
catch (Exception ex)
{
string message = ex.Message;
string script = string.Format("alert('{0}');", message.Replace("'", @""""));
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "KEY", script, true);
}
} CopyVB.NET Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim paths As String() = New String() {"~/RootDirectory1/"}
FullPermissionsTest(Server.MapPath(paths(0)))
End Sub
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)
testDir.GetDirectories()
Dim testFilePath As String = System.IO.Path.Combine(testDir.FullName, "TestFile1.txt")
System.IO.File.Create(testFilePath).Close()
testDir.GetFiles("*.*")
System.IO.File.OpenRead(testFilePath).Close()
System.IO.File.Delete(testFilePath)
System.IO.Directory.Delete(physicalPathToTestFolder)
Catch ex As Exception
Dim message As String = ex.Message
Dim script As String = String.Format(, message.Replace(, """"))
ScriptManager.RegisterStartupScript(Me.Page, Me.Page.[GetType](), "KEY", script, True)
End Try
End Sub
If an exception is thrown during the test, the text of the error (the value of the ex.Message property) will be shown as a JavaScript popup
|