File Manager Sample

We have received this nice File Manager sample application created by Mitch Stevens for HRTMS, Inc. He has kindly contributed the source code to be published and shared on our web site.

We’ll go over the application’s functionality first, and then cover the configuration and download links.

The first screen is the login form:

 

The provided sources come with 2 users:

User: admin        Password: admin

User: demo        Password: demo

 

Once you are logged in, you’ll see the File Manager page:

 

We have modified the original application very little to add support for extracting the icon from the file path using System.Drawing.Icon.ExtractAssociatedIcon(path).

 

Once you are in the File Manager page, you can perform all the typical operations of a file manager: Create a folder, delete a folder or file, rename, show file details, and manage users.

The administration panel lets you add, remove, edit users. For each user, you can define the name, user id, password and a user-specific sub-folder.

 

Configuration

The application works out of the box. However, to use it properly you have to setup two web sites on your web server. One is an empty site with the only task of returning files, the other is the File Manager application site.

For example: http://yoursite/Files is the file server site pointing to the root of the directory managed by the file manager.

In TMSFM_Settings.XML you’ll find the users and in Web.Settings.config the configuration of the application:

 

add key=”Wisej.LicenseKey” value=”Your Wisej License
add key=”Wisej.DefaultTheme” value=”Material-3″
add key=”ContentFolderRoot” value=”Your Content Folder
add key=”URLPrefix” value=”//Files/content/”
add key=”RootFolder” value=”The root folder of the project
add key=”SettingsFile” value=”Path toTMSFM_Settings.XML”
add key=”ForbiddenFiles” value=”exe,bat,msi,config,reg,ws,wsf,ps1,dll”
 

Zip File (196 Kb)