Arikkan
asked on
Need to use Physical Path on RadFileExplorer
I am using a solution with "radFileExplorer" used in the controls.
Here I was passing a virtual path that works just fine.
But when I added a network path to a Mapped Drive and used it in the "radFileExplorer ", it throws a run-time exception.
Any ideas guys on how to use the physical path correctly here?
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
protected void Page_Load(object sender, EventArgs e)
{
radFileExplorer1.Enabled = false;
try
{
//radFileExplorer1.Initial Path = Page.ResolveUrl("~/Folders AndFiles") ;
radFileExplorer1.DisplayUp FolderItem = true;
radFileExplorer1.EnableOpe nFile = true;
radFileExplorer1.AllowPagi ng = true;
radFileExplorer1.EnableCre ateNewFold er = true;
if (IsSuperUser() == true)
{
radFileExplorer1.EnableCre ateNewFold er = true;
}
else
{
radFileExplorer1.EnableCre ateNewFold er = false;
RemoveControlsFromFileExpl orer("Dele te");
RemoveControlsFromFileExpl orer("Rena me");
}
radFileExplorer1.VisibleCo ntrols = GetVisibleControls(); //Get the visible controls for the FileExplorer
radFileExplorer1.ExplorerM ode = Telerik.Web.UI.FileExplore r.FileExpl orerMode.T humbnails;
radFileExplorer1.ExplorerM ode = Telerik.Web.UI.FileExplore r.FileExpl orerMode.D efault;
radFileExplorer1.Configura tion.Allow MultipleSe lection = true;
radFileExplorer1.Configura tion.MaxUp loadFileSi ze = 1 * Constants.GigaByte;
InitializePageBasedControl s();
radFileExplorer1.Enabled = true;
}
catch (Exception ex)
{
ShowException("Error:" + ex.Message);
radFileExplorer1.Enabled = false;
}
}
//Initialize the File Locations (Download/View/Delete) for the Current page
private void InitializePageBasedControl s()
{
string[] uploadPaths = new string[] {};
string[] viewPaths = new string[] {};
string[] deletePaths = new string[] {};
//Set the paths as needed (Not working - Physical Paths)
uploadPaths = new string[] { "R:\DataFolder\Upload" };
viewPaths = new string[] { "R:\DataFolder\View" };
deletePaths = new string[] { "R:\DataFolder\Delete" };
//Set the paths as needed (Working - Relative Paths)
//uploadPaths = new string[] { "~\FoldersAndFiles\Upload" };
//viewPaths = new string[] { "~\FoldersAndFiles\View" };
//deletePaths = new string[] { "~\FoldersAndFiles\Delete" };
radFileExplorer1.Configura tion.Uploa dPaths = uploadPaths;
radFileExplorer1.Configura tion.ViewP aths = viewPaths;
radFileExplorer1.Configura tion.Delet ePaths = deletePaths;
}
Error1.png
Here I was passing a virtual path that works just fine.
But when I added a network path to a Mapped Drive and used it in the "radFileExplorer ", it throws a run-time exception.
Any ideas guys on how to use the physical path correctly here?
--------------------------
protected void Page_Load(object sender, EventArgs e)
{
radFileExplorer1.Enabled = false;
try
{
//radFileExplorer1.Initial
radFileExplorer1.DisplayUp
radFileExplorer1.EnableOpe
radFileExplorer1.AllowPagi
radFileExplorer1.EnableCre
if (IsSuperUser() == true)
{
radFileExplorer1.EnableCre
}
else
{
radFileExplorer1.EnableCre
RemoveControlsFromFileExpl
RemoveControlsFromFileExpl
}
radFileExplorer1.VisibleCo
radFileExplorer1.ExplorerM
radFileExplorer1.ExplorerM
radFileExplorer1.Configura
radFileExplorer1.Configura
InitializePageBasedControl
radFileExplorer1.Enabled = true;
}
catch (Exception ex)
{
ShowException("Error:" + ex.Message);
radFileExplorer1.Enabled = false;
}
}
//Initialize the File Locations (Download/View/Delete) for the Current page
private void InitializePageBasedControl
{
string[] uploadPaths = new string[] {};
string[] viewPaths = new string[] {};
string[] deletePaths = new string[] {};
//Set the paths as needed (Not working - Physical Paths)
uploadPaths = new string[] { "R:\DataFolder\Upload" };
viewPaths = new string[] { "R:\DataFolder\View" };
deletePaths = new string[] { "R:\DataFolder\Delete" };
//Set the paths as needed (Working - Relative Paths)
//uploadPaths = new string[] { "~\FoldersAndFiles\Upload"
//viewPaths = new string[] { "~\FoldersAndFiles\View" };
//deletePaths = new string[] { "~\FoldersAndFiles\Delete"
radFileExplorer1.Configura
radFileExplorer1.Configura
radFileExplorer1.Configura
}
Error1.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If your original problem is solved (which it seems to be) then please close this question and ask a new one about the now very different problem.
ASKER
Not really. I cannot view the files on the Absolute path.
>>But when I added a network path to a Mapped Drive and used it in the "radFileExplorer ", it throws a run-time exception.
ASKER
1. Mapped drive on a network folder: >> R:/Repository/FolderMapped
--> Here I can see only the ROOT folder on the control and nothing else. Cannot view/write anything (On root) and cannot see any subfolders.
2. Shared network folder: >> \\myComputerDesktop2\Repos
--> Here the whole radFileExplorer control is greyed out. Cannot see anything on it.
--> Just to check, I have given full control to Everyone (In Properties and Shares as well). But still cannot do anything on the folder....