The path is not a valid virtual path

The path to the xml file is described below:

tree.LoadContentFile(path); 

I am passing the full path from my local file system (or using Server.MapPath() ), but every time I keep getting this error:

[Path] is not a valid virtual path.

EDIT: I am using Telerik RadTreeView .

Sample path: "C:\inetpub\wwwroot\sitename\OutlookNavigation\tree.xml"

What am I doing wrong?

+6
source share
1 answer

.NET expects a path similar to

 ~/folder/file.txt 

or /folder/file.txt

which he will translate into the physical path.

+14
source share

All Articles