8 Answers, 1 is accepted

the filecontentprovider uses Server.MapPath to translate a url to a physical path.
So it depends on how (mapped driver, unc...) the IIS account can map your DFS paths.
If Server.MapPath does not work - you can overcome the situation by providing your own filecontentprovider.
This in not really hard - see the samples: http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/dbfilebrowsercontentprovider/defaultcs.aspx
Or play with my Code Library sample:
http://www.telerik.com/community/code-library/aspnet-ajax/file-explorer/extending-the-radfileexplorer.aspx
Or take a look at this code library entry which works with physical paths:
http://www.telerik.com/community/code-library/aspnet-ajax/file-explorer/use-local-path-instead.aspx
Regards
Manfred
PS: if this post was helpful please use "Mark as answer"

Hi,
I have tried these all and the problem is that when I give the control a path named \\Server.MapPath\folder\folder the code cuts off the first "/" from the path and reverses the slashes: such as /Server.MapPath/folder/folder and of course I get the error Failed to map path. So how do I tell the control to not look at the physical IIS server that the website is on but instead for it to use the server that I wish it to go to?
Thank you,
Darcy

sorry about the confusion - Server.MapPath is not a path - it is a method you can call in code behind.
http://msdn.microsoft.com/en-us/library/system.web.httpserverutility.mappath.aspx
The problem (I guess from your post) will be different.
First of all - it's not the control - it's all about security access to the network and other things like this.
Normally your site will run as "NETWORKSERVICE" - that is (if in the same AD domain) the account WebServerName$.
Take a look at the last answer here:
http://serverfault.com/questions/41130/network-service-account-accessing-a-folder-share
So the primary goal is to achieve access to the DFS folder.
By the way - here comes an extra layer of security.
You IIS Account must haver permissions to access the DFS - and the permissions on the physical path behind it.
If you are able to open (simply as response to a button click on a testpage) open a file using the DFS path you are almost done.
BUT - think about security if the server is "out in the wild" and the DFS is not part of the DMZ!!
Regards
Manfred

Hi,
It is not security, that is not the problem I am having with the control’s connection to folders. It is because the code behind the control changes the path structure that I am asking it to use.
I am able to use a TreeView from VS.Net and connect to that folder structure using a directory.Getdirectories(\\DFS\ folder\folder) and then load the nodes, without a problem.
Therefore, can the control connect to a server using DFS and if so can you post a sample of how this is done.
Thank you,
Darcy
By default the RadFileExplorer works with virtual paths only. In your case you need to use a custom file browser content provider that will work with DFS paths. Please note that, by default the PathSeparator symbol (in the FileBrowserContentProvider) is set to '/'. In your case you need to override this setting :
public override char PathSeparator |
{ |
get |
{ |
return '\'; |
} |
} |
Additionally, I recommend you check the information provided in this KB article as well.
I hope this helps.
Greetings,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

I was able to make it work!
Thank you,
Darcy

i'm having the same problem with Darcy (physical path error with / and \)
I understand you answer but is there any easier way to load physical path into File Explorer, or to change the char "/" to "\" ?
I get the Physical path directly from my sql table and i don't need any mapped files.
i don't need virtual paths because the address is not visible.
I use:
V.S. ASP.NET 2008 (VB)
ASP.NET AJAX Rad Controls 2010.2.929.35 Trial.
Thank you in advance for your time.
Best Regards,
Navarino Technology Department
By default, RadFileExplorer works with virtual folders only, that are part of the application. This is because the default FileBrowserContentProvider uses Server.MapPath in odder to get the physical path of the folders. Then this physical paths is used in order to list the content of the folders (suing the objects and methods from the System.IO namespace).
In your case you have to implement a custom FileBrowserContent provider which will work with physical paths and I recommend you to modify this one in order to fit your needs.
Best wishes,
Fiko
the Telerik team