I was using the mappingId from another portal, that was causing the problem. When i used the mappingId from the right portal it worked.
DNN - MappedPath is empty when updating a folder
-
09-10-2022 - |
Frage
Everytime i update one of my folders the mapped path of my folder becomes suddenly empty and i can't find a method to resolve to change it or add a new mapped path to it.
This is my code:
// Folder information
var folderInfo = new FolderInfo();
folderInfo.PortalID = base.PortalId;
folderInfo.FolderPath = txtEditFolderName.Text;
folderInfo.FolderID = Convert.ToInt16(Request.QueryString["eventID"]);
folderInfo.DisplayPath = txtEditFolderName.Text;
folderInfo.DisplayName = txtEditFolderName.Text;
folderInfo.FolderMappingID = 9;
// Update folder
FolderManager.Instance.UpdateFolder(folderInfo);
// Move folder
FolderManager.Instance.MoveFolder(folderInfo, txtEditFolderName.Text);
// TODO: REMOVE OLD DIRECTORY
// Add new directory
Directory.CreateDirectory(folderInfo.PhysicalPath);
Thanks in advance!
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow