| AJS 4.x
Manual | Note! This Manual is for the "Windows authentication" version, which is designed to work with existing Windows server or Active Directory accounts and Windows authentication. If you want to create accounts by yourself and store their credentials in your own HTTP Commander XML database, you need to download the "Forms authentication" version! This Manual is for the Windows authentication version only! | Web file manager Free Installation assistance Manual Home page

Source code modifications

The HTTP Commander is partially an open source code project. You can find open ASP.NET code in same files in the HTCOMNET root folder.
You are allowed to modify any of these files if you need:

- Default.aspx - This file is responsible for Forms and Windows authentication and loading of main interface. Here you can modify authentication code or change interface view mode: Uncomment `<div id="httpCommander" ..>` line to place HTTP Commander interface inside the DIV region (for example, iframe view).
- Logout.aspx - The file controls user logout process.
- Localization\Help\UsersHelp.html - Help file that users see by clicking help button on the toolbar.
- Global.asax - The file controls global events, error handling and programmatic users setup (optional).
- App_Code\ExternalCMSIntegration.cs - The code for integration with CMS like Joomla, Drupal.

Setup users and folders programmatically

You can setup users, their authentication, permissions and folders programmatically. I.e you don't need to use Admin panel and built-in XML files for storing data. This is needed if you have own database of users or you want programmatically setup users and folders.
All you need is to edit open source files:

- Global.asax stores sample code to setup users and folders. You should uncomment code in Application_Start event to use programmatic setup.

Below is the example of building list users, groups programmatically.
// Create some folders Folder DemoFolder1 = new Folder("Demo folder 1", @"%APPROOT%\DemoFolder\Folder1"), Folder2 = new Folder("Folder 2", @"%APPROOT%\DemoFolder\Folder2"), HomeDrive = new Folder("Home drive", "%HOME%"), AdminTestFolder = new Folder("Admin test folder", @"%APPROOT%\DemoFolder\%USERNAME%"), DomainUsersDemoFolder = new Folder("Domain users demo folder", @"%APPROOT%\DemoFolder\%GROUPNAME%"); // Add of the additional information for a DemoFolder1 DemoFolder1.Description = ""; DemoFolder1.CustomField = ""; // Create full permissions for some users and groups UserPermissions AdministratorUserPermission = new UserPermissions(AccountUtils.GetUserIdentity("Administrator")); GroupPermissions AdministratorsPermission = new GroupPermissions(AccountUtils.GetGroupIdentity("Administrators")); GroupPermissions DomainUsersPermission = new GroupPermissions(AccountUtils.GetGroupIdentity("Domain Users")); GroupPermissions DomainAdminsPermission = new GroupPermissions(AccountUtils.GetGroupIdentity("Domain Admins")); GroupPermissions UsersPermissions = new GroupPermissions(AccountUtils.GetGroupIdentity("Users")); //// Create special permissions for Folder2: // for DomainUsers GroupPermissions DomainUsersPermissionFolder2 = new GroupPermissions(AccountUtils.GetGroupIdentity("Domain Users")); DomainUsersPermissionFolder2.Create = true; DomainUsersPermissionFolder2.Delete = true; DomainUsersPermissionFolder2.Rename = true; DomainUsersPermissionFolder2.Upload = true; DomainUsersPermissionFolder2.Download = true; DomainUsersPermissionFolder2.ZipDownload = true; DomainUsersPermissionFolder2.Zip = true; DomainUsersPermissionFolder2.Unzip = true; DomainUsersPermissionFolder2.Cut = true; DomainUsersPermissionFolder2.Copy = true; DomainUsersPermissionFolder2.Modify = true; DomainUsersPermissionFolder2.ListFiles = true; DomainUsersPermissionFolder2.ListFolders = true; FileTypeRestriction Deny_EXE_BAT_ASPX = new FileTypeRestriction(RestrictionType.Deny, new string[] { "EXE", "BAT", "ASPX" }); DomainUsersPermissionFolder2.ListRestriction = Deny_EXE_BAT_ASPX; DomainUsersPermissionFolder2.CreateRestriction = Deny_EXE_BAT_ASPX; DomainUsersPermissionFolder2.customField = ""; // for Users GroupPermissions UsersPermissionFolder2 = new GroupPermissions(AccountUtils.GetGroupIdentity("Users")); UsersPermissionFolder2.ListRestriction = UsersPermissionFolder2.CreateRestriction = Deny_EXE_BAT_ASPX; //// Assign permissions to the folders: // DemoFolder1 DemoFolder1.UserPermissions.Add(AdministratorUserPermission); DemoFolder1.GroupPermissions.Add(DomainUsersPermission); DemoFolder1.GroupPermissions.Add(DomainAdminsPermission); DemoFolder1.GroupPermissions.Add(UsersPermissions); DemoFolder1.GroupPermissions.Add(AdministratorsPermission); // Folder2 Folder2.UserPermissions.Add(AdministratorUserPermission); Folder2.GroupPermissions.Add(DomainUsersPermissionFolder2); Folder2.GroupPermissions.Add(DomainAdminsPermission); Folder2.GroupPermissions.Add(UsersPermissionFolder2); Folder2.GroupPermissions.Add(AdministratorsPermission); // HomeDrive HomeDrive.UserPermissions.Add(AdministratorUserPermission); HomeDrive.GroupPermissions.Add(DomainUsersPermission); // AdminTestFolder AdminTestFolder.UserPermissions.Add(AdministratorUserPermission); // DomainUsersDemoFolder DomainUsersDemoFolder.GroupPermissions.Add(DomainUsersPermission); // Add created folders to the list List<Folder> folderList = new List<Folder>(); folderList.Add(DemoFolder1); folderList.Add(Folder2); folderList.Add(HomeDrive); folderList.Add(AdminTestFolder); folderList.Add(DomainUsersDemoFolder); // Set SimpleAccountManager and SimpleFolderManager as work classes Utils.ConcreteSimpleAccountManager = new SimpleAccountManager(); Utils.ConcreteSimpleFolderManager = new SimpleFolderManager(folderList);

Change Application settings programmatically

You can change Application settings or set individual settings for each session programmatically:

- To change Application settings type in code like:
  Utils.UserSettings.ShowDiagnosticsASPXOnlyForAdmins=false;
  This is setting of parameter "ShowDiagnosticsASPXOnlyForAdmins".
- To set individual Application settings for each user session type in code :
  Utils.UsePersonalConfiguration = true; Utils.UserSettings.ShowDiagnosticsASPXOnlyForAdmins=false;
  This is setting of parameter "ShowDiagnosticsASPXOnlyForAdmins" for current session. Then you want to use setting for individual session set Utils.UsePersonalConfiguration flag to the "true".

The HTTP Commander has a license with full open source code in case you need to make more changes. Our support team can make some custom modifications for you as well.
DIV view mode: