Forum


HomeHomePremiumPremiumDevelopmentDevelopmentDnn File Management IssuesDnn File Management Issues
Previous
 
Next
New Post
7/24/2017 6:51 AM
 

I'm trying to use DNN's file system to provide users with documents. I've had luck in the past using this system but now I've started encountering errors that are making me think this system is broke. For instance I have created a folder using the file system then I load a document into the folder. This all works fine. However when I try to retrieve the files from the folder I always get 0 files found. I tried manually deleting the folder to re-create it but the FolderManager states that the folder already exists which then causes and error when I attempt to save a file to a location that doesn't exist. Examples:

var rootExists = FolderManager.Instance.FolderExists(PortalSettings.PortalId, rootFolderPath); 

if (!rootExists) // states true even though folder doesn't exist
                FolderManager.Instance.AddFolder(PortalSettings.PortalId, rootFolderPath);

var folder = FolderManager.Instance.GetFolder(PortalSettings.PortalId, "PATH/" + UserInfo.UserID);

// create file

var filelist = FolderManager.Instance.GetFiles(folder);  // always returns 0 even though I can browse to the directory and open the file.

I have gone as far as to check the dbo.Folders table and removed any entrees to the folder I have deleted. Still states the folder exists. 

I think it's a very basic requirement that when I have a method like 'FolderExists' it should at minimum actually check that the folder is there. Has anyone encountered issues using the file system? Thanks.

 
New Post
7/25/2017 3:05 AM
 

There are two components to the DNN File Manager, the database (Files and Folders tables) and the file system itself (/portals/x).  Whenever I have issues like this, I make sure the database and filesystem are in sync.  There is a folder synchronize button on the UI of the File Manager that does that.  If you delete the a folder on the UI, it should delete the physical folder in /portals/x on the filesystem and the folder record in the table.  So if you don't see the folder in the UI, it is probably deleted from the Folders table, but it may still exist on the file system.  Possibly you have an application issue where DNN does not have the correct permission to create or delete the folder on the file system.  Check your file permissions for your DNN website and make sure your application pool identity user (IIS_ISR) has FULL permission on the DNN website root and all subfolders.

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentDnn File Management IssuesDnn File Management Issues



Try FREE
30 days money back guaranteed