This question is locked. New answers and comments are not allowed.
Hi telerik Guys !
Im using RAD FILE EXPLORER as the main control in my current project.
Actually what Iam here trying is to create a nested ROOT structure just like :-
----Root
:
: -------Child Folder 1
:
:---------Child Folder 1a
:
:---------Child Folder 1a(i)
:
:--------Child Folder 1a[i(a)]
Now when I try to UPLOAD an file within the Child Folder 1a[i(a)] folder Im getting the below mentioned error in my CustomFileSystemProvider.cs class:-
"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
Below is the code that is creating an problem :-
Problem exist in the italized text in the above code.
Please help ........
I dont have a clue where Iam getting thing wrong. ??
Ajay
Im using RAD FILE EXPLORER as the main control in my current project.
Actually what Iam here trying is to create a nested ROOT structure just like :-
----Root
:
: -------Child Folder 1
:
:---------Child Folder 1a
:
:---------Child Folder 1a(i)
:
:--------Child Folder 1a[i(a)]
Now when I try to UPLOAD an file within the Child Folder 1a[i(a)] folder Im getting the below mentioned error in my CustomFileSystemProvider.cs class:-
"The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
Below is the code that is creating an problem :-
public override DirectoryItem ResolveRootDirectoryAsTree(string path) |
{ |
string physicalPath; |
string virtualPath = string.Empty; |
if (this.IsPhysicalPath(path)) |
{// The path is a physical path ; |
physicalPath = path; |
foreach (KeyValuePair<string, string> mappedPath in MappedPaths) |
{ |
// Check whether a mapping exists for the current physical paths ; |
if (GMP.AddSlashAtEndOfPhysicalPath(physicalPath).ToLower().StartsWith(mappedPath.Value.ToLower())) |
{// Exists |
virtualPath = Regex.Replace(GMP.AddSlashAtEndOfPhysicalPath(physicalPath), Regex.Escape(mappedPath.Value), mappedPath.Key, RegexOptions.IgnoreCase); |
virtualPathvirtualPath = virtualPath.Replace('\\', '/'); |
virtualPath = GMP.AddSlashAtEndOfVirtualPath(virtualPath); |
break;// Exit the 'foreach' loop ; |
} |
} |
// Mappind does not exist ; |
} |
else |
{// Virtual path ; |
virtualPath = GMP.AddSlashAtEndOfVirtualPath(path); |
physicalPath = this.GetPhysicalFromVirtualPath(path); |
if (physicalPath == null) |
return null; |
} |
DirectoryItem result = new DirectoryItem(this.GetDirectoryName(physicalPath), string.Empty, virtualPath, string.Empty, fullPermissions, null, GetDirectories(virtualPath)); |
foreach (DirectoryItem dirItem in result.Directories) |
{ |
// Get the information from the physical directory |
DirectoryInfo dInfo = new DirectoryInfo(Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(dirItem.Path))); |
// Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer |
// If the name attribute matches the unique name of a grid column |
DataTable dt = new DataTable(); |
dt = Glb_Entities.ExecuteSPReturnDT(new object[]{"Usp_Dms_FolderDate" |
,"Folder_Path", (dirItem.Path.TrimEnd("/".ToCharArray())).Substring(0,dirItem.Path.TrimEnd("/".ToCharArray()).LastIndexOf("/")) |
,"Folder_Name", dInfo.Name |
}); |
dirItem.Attributes.Add("CreatedDate", dt.Rows[0]["CreateDate"].ToString()); |
dirItem.Attributes.Add("ModifiedDate", dt.Rows[0]["LatestDate"].ToString()); |
} |
return result; |
} |
Please help ........
I dont have a clue where Iam getting thing wrong. ??
Ajay