HTTP Commander common FAQ
How can I update my existing installation with the latest version without losing config and settings?
Answer:
- Back up HTTP Commander installation folder, usually "C:\inetpub\wwwroot\HTCOMNET\".
Back up NTFS permissions (optional).
Note If you skip this step, you'll need to restore NTFS permissions manually after installing the new version.
Note This step applies to Windows Server 2003 SP2, Windows Server 2003 R2 SP2, Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 and newer versions of Windows OS.
Execute the following command as administrator:
icacls C:\inetpub\wwwroot\HTCOMNET /save C:\htcomnet.acl /T
Here "C:\inetpub\wwwroot\HTCOMNET" is HTTP Commander installation folder,
"C:\htcomnet.acl" is a file to store NTFS permissions.
- Download the last version of the application on the Web file manager HTTP Commander page.
- Unblock distribution archive if you used Internet Explorer browser to download the archive.
- Delete all files in the HTTP Commander installation folder.
- Install the new version, that is unpack the archive into the installation folder.
- Restore Data\ subfolder, HttpCommanderSettings.config1 file from backup archive.
Restore the NTFS permissions (only if you saved them earlier).
Execute the following command as administrator:
icacls C:\inetpub\wwwroot /restore C:\htcomnet.acl /C
Here "C:\inetpub\wwwroot" is the parent folder of HTTP Commander installation folder,
"C:\htcomnet.acl" is a file with NTFS permissions.
/C flag is to ignore errors about missed files (some files from old version
could be missed in new one)
- Revise the NTFS permissions in HTTP Commander installation folder2.
NTFS permissions of the installation folder itself will not change (unless you recreated the folder).
You need to revise permissions on Data subfolder, HttpCommanderSettings.config, etc.
- Reapply all changes you made to the HTTP Commander source files.
For example, you may have customized the Default.aspx, Logout.aspx pages,
localizations files in the Localizations subfolder.
We discourage you from using files from an old installation of HTTP Commander.
All customizations performed through Admin panel web interface are saved in the HttpCommanderSettings.config
file and Data subfolder, you do not need to reapply them, with minor exceptions.
A few settings from Admin panel are saved in the web.config,
namely mail settings and authentication mode.
You need to port them to the new web.config file.
- Starting from version 2.0.6 HTTP Commander requires at least 4.0 version of .NET
framework.
How to check version of .NET framework (on IIS 7 and later):
- Please, surely perform tunings, specified in the description of up-dating.
- Configure access on WebDAV.
Please open Web.config file for editing (for example in notepad) and add (if not exists) before the opening tag <system.webServer> next lines:
<location path="your_webdav_identifier">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>,
where your_webdav_identifier— value of IdentifierWebDav parameter (default value hcwebdav).
Also, starting from version 2.0.11 if enabled parameter AnonymousEditingOffice:
path to connect WebDAV folder begins with
http://yourdomain/HTCOMNET/hcwebdav/0/ (added suffix '0').
For more info see article Web folders.
Note 1 Old versions (prior to 1.7 version) of HTTP Commander stored settings in the appSettings collection of the web.config file,
there was no HttpCommanderSettings.config file.
You need to manually port the settings to the new configuration file.
Note 2 You may skip the step of revising NTFS permissions on installation files
if you copy new distribution files over the old installation or if you restore permissions with icacls utility.
In copy over scenario you need to manually remove files that are missing in the new version of HTTP Commander.
I got a "Request for the permission of type 'System.Web.AspNetHostingPermission... error
Answer: Problem related to latest Windows 2008 security.
You need to unblock HTTPCommanderAJS3.x.x.zip (Distribution archive) file because
it came from another PC (Internet) and then extract it to HTCOMNET folder again.
Restart the application after this (Close w3we.exe process). See Installation section how to unblock files.
I can't install the application. Is there anybody why can help me?
Answer: You can run diagnostics and look for known problems.
If you can't run the application or configure folders, we offer free installation assistance for both trial and commercial licenses.
You can get help via email, instant messenger or via remote access to your server.
You only need a few minutes to get online help.
How can I restart the application?
Answer: To restart the application, click the "Restart" button in the Admin panel.
Also to restart the application, you can make some changes in the Web.config file (e.g. add a spacer in any comment). The Application will restart automatically.
For full application restart (only if you have some system errors!):
- Stop all w3w.exe (aspnet_wp.exe in Windows 2000) processes;
- Delete C:\WINDOWS\Microsoft.NET\Framework\[.NET version]\Temporary ASP.NET Files\HTCOMNET folder.
How can I change the logo or top header?
Answer: You can add a logo to the toolbar or to the top panel (at the top of file manager window).
- To change logo on the top panel, modify the LogoHeaderHtml parameter at Application settings.
Note. If you insert an image, in its' html style tag, make sure you specify the sizes in pixels: style="width:Wpx;height:Hpx;".
To show the logo on the toolbar, add "logo" to the ToolbarButtons1
or ToolbarButtons2 parameter at Application settings.
To modify logo (set your own image):
- Place the logo image in the HTCOMNET\Scripts\ folder.
- Open the file HTCOMNET\Styles.css in Notepad and find the ".x-logo-icon" style at the bottom.
Set your image width and height at the width and height parameters. Save the file.
- Open the file HTCOMNET\Scripts\Main.js in Notepad.
Find the "logoBtn=config.logoBtn||{url:"",tooltip:"Your logo or link",icon:"Scripts/logo.png",showInNewWindow:false}" string.
Set the URL for the logo button (set empty value if it is not a link), tooltip and icon image file name. Save the file.
How does HTTP Commander control user's count?
Answer: HTTP Commander controls user session count and unique user's names.
A new session is created for every visitor. Each user can have a few sessions
if he doesn't clicked logout button. But after 1 hour, the session is closed automatically.
To terminate existing sessions by yourself, you need to restart the application.
How can I use HTTP Commander with SSL?
Answer: HTTP Commander works both with http and https protocols.
http protocol works out of box.
To enable https protocol, you need to install an SSL certificate on IIS.
The instructions below describe how to order a certificate
from a globally recognized certificate authority (recommended option)
and how to create a self-signed certificate.
A self-signed certificate will allow you to use the https protocol,
but the web browser will warn that
the certificate is not valid since it comes from an unknown authority.
To get a certificate that passes verification, you need to either order a certificate at
a globally recognized certificate authority, or establish a trusted authority
inside your corporate network.
Order certificate at a globally recognized certificate authority
As an example we consider ordering a certificate at Thawte.
You may choose any other authority you trust.
- Select a certificate for your web site: SSL certificates.
- Generate a Certificate Signing Request as described in Key and CSR Generation Instructions.
You'll need it later.
- Click the Buy button to order the chosen certificate. You'll fill out a number of web forms in the process.
At one step you'll have to specify the Certificate Signing Request.
- Track the status of the certificate in Thawte Certificate Center.
- Install the SSL certificate according to Thawte manual.
- Backup the certificate (optional).
Install Self-Signed certificate
- For IIS 5, 6
- Download the Microsoft IIS resource kit (supports IIS 5,6) at http://www.microsoft.com/downloads/details.aspx?FamilyID=56FC92EE-A71A-4C73-B628-ADE629C89499&displaylang=en.
- Install the IIS resource kit on the server.
- Run Start-> Programs-> IIS Resources-> Self SSL-> SelfSSL
- See the instructions about how to run the command to create your own SSL.
Run the command: selfssl.exe /N:CN=DOMAINNAME /K:1024 /V:7 /S:1 /P:443
- Now you can open https://localhost/HTCOMNET/ in a browser.
- To disabled non-SSL connections, open IIS manager, expand the web site tree, right-click the HTCOMNET application, select "Properties", open Directory Security tab, click "Edit...", check "Require secure channel (SSL)".
- For IIS 7 and above
- Open IIS manager, select the server node in the connections tree
- Open the Server Certificates feature
- On the actions pane click the "Create Self-Signed Certificate" link
- Specify a friendly name of the certificate in the opened dialog box.
That may be any name. Click OK button.
- The certificated is created, you should see it in the Server Certificates list.
- Select the web site that contains HTTP Commander in the connection tree
- Click the Bindings link on the actions pane
- In the Site Bindings dialog click the Add button.
- Select https protocol in the type box in the "Add Site Binding" dialog box
- Select the SSL certificate you created earlier in the "SSL certificate" box
- Change any other settings in the dialog box, if changes are needed, click the OK button.
- Click the Close button to close the Site Bindings dialog.
- You're done now, you can use the https protocol to connect to HTTP Commander.
A self-signed certificate is untrusted by definition. The web browser will warn you about the problem when
you try to open a web site with untrusted certificate.
Screenshot
WebDAV over https with invalid certificate works unreliably.
While web browser will warn you about the problem and allow you to proceed,
WebDAV may refuse to connect to the web folder with a misleading error message.
You may circumvent the problem by installing self-signed certificate into the trusted authorities container
on the client machine.
Install untrusted certificate into trusted authorities container
- Open Internet Explorer with administrative rights
Open target site using https
Screenshot
Confirm that you want to proceed in spite of the security problem.
Screenshot
Click "Certificate Error" Security report on the address bar,
then click the "View certificates" link in the pop-up window.
Screenshot
Click the "Install Certificate" button in the certificate properties window.
Screenshot
Click "Next" in the Certificate Import Wizard. On the next step, "Certificate Store",
select "Place all certificates in the following store", in the "Certificate store" field
select "Trusted Root Certification Authorities". Click "Next".
Screenshot
- Click Finish to close the Certificate Import Wizard.
Click "Yes" in the security warning dialog box.
Screenshot
How can I use site common authentication with the application?
Answer: If you have your own ASP.NET authentication at your site you can pass users to HTTP Commander without extra authentication.
Also in such a case you don't need to create users in the HTTP Commander Admin panel.
You can create just the folders and assign folders to the users by typing their names in text box (not from list).
To make common authentication at site and application you need to modify your site Web.Config file and application Web.config file:
Place the same line in both of the files inside the <system.web> area:
For more information, read this article http://msdn.microsoft.com/en-us/library/eb0zx8fc.aspx
See CommonAuthentication section for more detailed info and examples
How can I skip Forms authentication?
Answer: If you have provided an access to some files for all visitors, but there's no need to use Forms authentication for all users or only some of them, you can use the following methods:
- Method 1:
- Create a user with a name (e.g. "Visitor") and a password (e.g. "anypassword") in the Admin panel or in the XML file.
- Set the necessary folders for "Visitor" user.
- If you want to skip authentication for some users you can pass username and password or passwordhash in URL. See details
- Use the link
HTCOMNET/Default.aspx for other users who require authentication.
- Method 2. You need to modify 2 lines of code:
- Create a user with the name "Visitor" and any password in the Admin panel or in the XML file.
- Set the necessary folders for "Visitor" user.
- Open the Default.aspx file using Notepad
- Search for the line
"ValidateUserResult validateUserResult = ValidateUserResult.Failure;"
- Add two new lines after it. You should now have:
- Save the file.
- Now all your visitors will logon as the user "Visitor" automatically.
We have our own users/folders database. How we can use it in HTTP Commander?
Answer: First, read the 2 previous questions (How can I skip Forms authentication?,
How can I use site common authentication at application?).
If it is not enough then you can modify the code of Default.aspx and programmatically control authentication and folders:
Find the function called "SetPersonalConfiguration" and see its code example.
Don't forget to "uncomment" it (remove "//" at the line of its call).
Contact Element-IT support if you need help in code modifications for your needs.
Can the first loading process be faster?
Answer: The HTTP Commander has AJAX and 100% Java Script interface so it works rather quickly like a local application.
When a visitor logons the HTTP Commander for the first time, it takes some time to load *.js and *.css files.
Such files are stored in a browser cache for some months, so the next logons will be much quicker.
You can make even the first loading process faster if you enable gzip compression in the IIS settings. With gzip enabled, the loading is 4-5 times faster. You need to enable gzip for static and dynamic content (*.js and *.css files). See article how to enable compression in IIS 7 (Win 2008) or for IIS 6 (Win 2003).
Download the trial HTTP Sniffer to test if the compression works successfully.
Screenshots for IIS 7, 8
Can I make the application faster (increase performance)?
Answer: Yes. There are a few things that can help you make the application faster. You can do all or just some of them:
- It is recommended to enable gzip compression
- You can setup content expiration for the Images\ folder so images will be loaded for the user once
and requests "if-modified" will not be sent again during the next logon.
This can increase performance in some cases because application uses many images.
To setup content expiration:
For IIS 7, 8: expand the HTCOMNET\Images\ folder, then in the right panel open "HTTP Response Headers". Choose action "Set common Headers..." and set content expiration on 2020 year (for nearest 10 years).
For IIS 6: open HTCOMNET\Images\ folder settings at IIS, open "HTTP Headers" tab and set "Expire on" 2020 year (for nearest 10 years).
- You can disable the tree view or make it not auto collapsible.
This makes the application faster because no requests for tree updates are needed.
To disable tree set the "HideTree" parameter in the Application settings to "false"
or set the parameter "TreeView" value to "NotAutoExpandable".
- Don't use a lot of columns for the files grid at "DisplayedDefaultColumnsInList" parameter of Application settings.
Rendering files grid takes some time at the users side if there are many files in the folder.
- Note! Don't test application performance with Internet Explorer 8.
This version works ineffectively with java scripts and HTML objects.
More popular browsers like FireFox, Chrome, IE 9 are a few times faster.
If I map a folder I get the error "The folder you entered does not appear to be valid..."?
Answer: First, try to map folder "http://demo.element-it.com/examples/demowindows/hcwebdav" (without quotes).
If it doesn't show the error and asks for credentials then it works (You can use demo/demo credentials).
If mapping demo folder works but it doesn't map your application link, then the problem is with the application or WebDAV configuration.
Check web folders mapping setup or contact us.
You cannot map folders in Server OS like Windows 2003, 2008 or 2012 by default.
So, please test mapping from a non-server PC.
If you want to map to Server OS then you need to do some steps:
- For Server 2008, 2012: Click Start->Administration Tools->ServerManager->Features->Add Features-> check 'Desktop Experience' and click 'Install' button
Screenshots
- For Server 2003: Start "WebClient" service at Administration Tools->Services and change Startup type to Automatic.
I got an "Access to path '...' is denied" error.
Answer: The problem is related to the NTFS permissions.
Check the NTFS permissions for HTCOMNET, data and your main content folders.
See the NTFS Permissions section of the Documentation.
I got The page cannot be found error (error 404) when I open http://localhost/HTCOMNET/default.aspx or any other page.
Answer: If you are sure that the path http://localhost/HTCOMNET/default.aspx exists but you are still getting the error,
it means that the IIS doesn't execute ASP.NET code.
Reasons:
1. You should allow ASP.NET 2.0 or 4.0 running in Web service extension list. See "Application Install" section of the Documentation.
2. This problem occurs if your IIS was installed after the .NET framework installation.
Reinstall the .NET framework or execute the following command as administrator:
On a 32-bit system:
%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i
On a 64-bit system:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
I see the page with ASP.NET tags at the top e.g. "<%@ Page Language="C#" %>".
Answer: ASP.NET has not started on the server and you have opened pages like clear HTML. See the "Application Install" section.
I got a "Required permissions cannot be acquired" error.
I got a "Request for the permission of type 'System.Security.Permissions... error.
Answer: Both errors can be related to "Full trust" level. Check if "Full trust" is enabled for HTCOMNET application. For windows 2008, 2012 see the "Application Install" section.
For windows 2003 open the file C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config and add the code below, save the file.
Also, check the permissions for "NETWORK SERVICE" or "IIS APPPOOL\DefaultAppPool" user on the HTCOMNET folder as well.
See the NTFS permissions section.
I got a "Internet Explorer cannot download Download.ashx from [domainname]" error while a file was being downloaded.
Answer:
If you are using SSL, check Internet Explorer settings: Tools-> Internet Options-> Advanced-> Security-> uncheck "Do not save encrypted pages to disk". By default this option is unchecked.
If the option is checked, the files cannot be saved from any SSL website.
I got a "Server Application Unavailable" error.
Answer: There are two reasons for such error:
- The problem can appear because ASP.NET 2.0 and ASP.NET 1.1 applications are being used by the same pool.
Check all your applications in IIS and set one application pool for the applications running under ASP.NET 2.0
and another pool for applications running under ASP.NET 1.1.
- There are not enough NTFS permissions to HTCOMNET folder.
See the NTFS permissions section of the Documentation.
There can also be some other reasons. You can try to restart the application.
I got the Error "500.19" at web.config file ("modules" section).
Answer: This error can occur if you are using IIS 7 or 8 and you have disabled some features of web.config to delegate.
In most cases it occurs with the "modules" feature.
You should open IIS, click the server root in the left tree.
At the right panel, open "Feature Delegation", then Select "Modules" and change its delegation type to "Read/Write".
If you have the error with other features, then set the delegation type for the other features.
Screenshot
I've opened "Silverlight" file uploader tab but the window is empty.
Answer:
- If you are running IIS 6 (windows 2003), you need to check if MIME type is added for Silverlight .xap files in IIS. See Application install in IIS 6 section.
- If you see the Silverlight installation button or a dialog window, and nothing is happening after Silverlight is installed, click F5 to refresh a browser.
Does HTTP Commander support Web garden or Web farm?
Answer:
No. HTTP Commander is running but does not work correctly if you have web garden or web farm enabled in IIS.
Check if you have enabled web garden in the application pool settings and disable it or create a new pool for HTTP Commander.
You should use only one worker process for the application.
Is HTTP Commander supports file solutions like DFS folders, UNC folders, ABE, NAS?
Answer: Yes, it supports DFS, UNC, ABE, NAS and most other file related Windows Server technologies.
First you would set up the folder in the Admin panel.
Then type the path to the DFS folder like \\domain\foldername or UNC like \\servername\share\folder.
For ABE see more info here.
How Can I configure documents management features like Google docs, MS Office and OpenOffice online edit?
Answer:
All info related to documents management features is described in the Application settings section.
Can my users type their address and other info while performing self registration?
Answer:
Yes, there is a special free custom field in the Accounts.xml file to store any extra info.
In the Default.aspx code file you can find txtRegisterExtraInfo textarea —
this textarea visible at registration form.
You can make its size greater if you need to.
Also for localization of XML files there is a parameter: <RegisterExtraInfo>Extra info</RegisterExtraInfo>.
You can replace "Extra info" text with your custom like "Type your address here".
Can I pass some settings in URL?
Answer:
Yes, you can pass some settings in the URL:
- Use "Default.aspx?Language=English" to pass default language.
- Use "Default.aspx?folder=foldername" to open a specific folder first.
- Use "Default.aspx?file=path/to/file" to open a folder with the file and highlights it.
- Use "Default.aspx?isEmbeddedtoIFRAME=true" to show interface for iframe mode (with small icons).
- Use "Default.aspx?hideTree=true" to hide (or show by default if value is "false") tree panel with folders on left side (see HideTree parameter).
- Use "Default.aspx?TreeView=disabled", "Default.aspx?TreeView=enabled" or "Default.aspx?TreeView=notautoexpandable" to change view of tree panel with folders on left side (see TreeView parameter).
- Use "Default.aspx?defaultGridView=thumbnails" or "Default.aspx?defaultGridView=detailed" to show file list in thumnails or detailed mode
- Use "Default.aspx?Mobile=" to show the mobile interface (Smartphones) by default.
- Use "Default.aspx?Standard=" to show the standard interface (non Mobile) by default.
- Use "Default.aspx?username=jdoe&password=mypassword" to pass the username and password.
- Use "Default.aspx?username=jdoe&passwordhash=MD5passwordhash" to pass the username and password MD5 hash.
Note! This option is disabled by default for security reasons.
To enable it open the Default.aspx file with Notepad and remove the first 2 symbols "//" at line of code: "// validateUserResult = Utils.AccountsManager.ValidateUserHash(userName, passwordHash);"
Use any online utility to generate password MD5 hash (like this)
- You can include all parameters like "Default.aspx?Language=English&Mobile=&username=jdoe&password=mypassword"
- Use "Default.aspx?Register=" to show the self registration page
- Use "Default.aspx?RecoverPassword=" to show the password recovery page
- Use "Default.aspx?ChangeEmail=" to show the change email page
- Use "Default.aspx?folderFilterAllow=foldername1,foldername2" to provide access only to the folders specified in the URL
(this example will show only foldername1 and foldername2 and hides all others)
- Use "Default.aspx?folderFilterIgnore=foldername1,foldername2" to hide folders specified in the URL
(this example will show all folders but not foldername1 and foldername2)
- Use "Default.aspx?folderFilterAllowRegexp=folderregexp" to provide access only to
the folder named in the regexp expression used in the URL
(this example will show only folderregext and hides all others)
- Use "Default.aspx?folderFilterIgnoreRegexp=folderregexp" to hide the folder named in the regexp expression specified in the URL
(this example will show all folders but not folderregext)
How can I share remote folders (stored at another server within internal network)?
Answer:
You can share remote folders but you need to take the steps listed below:
-
Create on the server where HTTP Commander is installed a new user (for example with name hcuser)
with the password (for example, password).
Note! On creation of users uncheck the
User must change password at next logon check box and check the
Password Never Expired checkbox.
Screenshot
- Make the same user with the same password on the server where you have folders to share.
- Set NTFS and File Sharing permissions to read/write for hcuser to folders to share.
-
Run on the server where HTTP Commander is installed the following command from a command window:
aspnet_regiis -ga MachineName\hcuser
Where MachineName is the name of your server or the domain name.
The aspnet_regiis utility is located in the folder there .NET Framework installed:
%WINDIR%\Microsoft.NET\Framework\version\
where the version depends on that what pool of applications for HTTPCommander is used.
-
For HTTP Commander application pool settings in IIS, specify the newly created user as the work Identity
For more info see MSDN How To's.
Screenshots
OR alternative way:
in the HTCOMNET\web.config file, find the line identity impersonate="false" .. and replace with the :
<identity impersonate="true" userName="hcuser" password="password" />
Screenshots
How can I add Static Content Role service at IIS7?
Answer:
To add Static Content role go to
Start -> Administrative Tools -> Server Manager -> Roles.
Find in the right list the Web Server (IIS) role and click the Add Role Services link.
In the new window check Static Content, and then click Next and then Install button.
Screenshots
When I am authenticated for "Download/Upload from/to Google", I got the "The site "http://yourdomainname.com" has not been registered." error.
Answer:
Open your account management page at Google where the yourdomainname.com domain is registered
and on the MangeDomain page, specify your domain in the Target URL Path prefix field.
Screenshots
How do I protect configuration files (prevent them to be retrieved by users)?
Answer:
HTTP Commander stores configuration data on the server in a number of files.
For security reasons, it is recommended to prevent users from retrieving them,
since they expose sensitive information about the application. Configuration files are:
web.config, HttpCommanderSettings.config, .xml file in the Data folder.
web.config, HttpCommanderSettings.config files are protected by default.
.xml files in Data folder are protected via the following section in web.config file
(in case of trouble make sure these settings are present in the configuration file).
<location path="Data">
<system.web>
<httpHandlers>
<add path="*.xml" verb="*" type="System.Web.HttpForbiddenHandler"/>
</httpHandlers>
</system.web>
<system.webServer>
<!-- Setting only for IIS 7 and 7.5 -->
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".xml" allowed="false" />
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>
</location>
In IIS 7 and above, configuration is restricted to web.config file.
For IIS 5, 6 you need to proceed one step further to complete the setup.
Map the .xml file name extension to ASP.NET as described in
KB815152, Edit Script Mappings in Internet Services Manager section.
Apply the setting to the HTTP Commander virtual directory.
To test the settings, try to download the configuration files with a browser (http://server/HttpCommander/Data/Accounts.xml). You should see
Screenshots
IIS 6 response
IIS 7 response
Can I use SSO?
HTTP Commander includes examples of Single Sign-On (SSO) both for Basic authentication and authentication via Form (for Active Directory users).
Summary
- HTTP Commander with Windows authentication (Windows or Basic authentication in IIS, and ASP.NET impersonation is turned on)
You may delegate authentication to the application by means of asynchronous HEAD request to Default.aspx page.
The request should possess valid credentials.
- HTTP Commander with Forms authentication (Anonymous and Forms authentication in IIS).
The application may use its' own account database (Accounts.xml file in Data directory) — Forms authentication mode
or use windows accounts — "Forms with Windows users" authentication mode.
There are two options to delegate authentication to HTTP Commander.
- Pass the user name and password to the Default.aspx page in query string or in POST request.
For example, HttpCommander/Default.aspx?username=User1&password=Passw*rd.
- Forms authentication across applications
- Shibboleth authentication. HTTP Commander delegates authentication to Shibboleth.
See Shibboleth integration for more details.
Details
In all cases except Forms authentication across applications,
you should have valid credentials to authenticate in HTTP Commander.
Thus SSO topic breaks up into two subtopics:
obtaining credentials and authenticating in the Web file manager.
-
Basic authentication on the other site:
If you have a web site configured for Basic authentication,
then you can pass these credentials to HTTP Commander so users will be authenticated in it as well.
To authenticate in HTTP Commander, you need to send an AJAX request with credentials to the application.
HTTP Commander distribution archive includes an example page BasicLoginExample.html in the Manual folder.
To enable SSO you need:
- Add the HttpCommanderAuthModule module in IIS 7 or 8 to your main web site:
- Copy the Manual\owa\module\HttpCommanderAuthModule.dll file to the Bin folder of your main site.
- Open IIS Manager and navigate to the site. In Features View double-click Modules.
On the Modules page, in the Actions pane, click Add Managed Module.
In the Add Managed Module dialog box, in the Name box,
type a name for the managed module, e.g. HttpCommanderAuthModule.
In the Type box, enter exactly the following: HttpCommander.HttpCommanderAuthModule.
Click OK. (Note. If you see warning as on the 2nd screenshot click "Yes")
Screenshots
Or you can add in the file web.config of site in the section system.webServer/modules a line
<add name="HttpCommanderAuthModule" type="HttpCommander.HttpCommanderAuthModule" />.
Screenshot
- Open for editing the BasicLoginExample.html file.
Copy its content to any page of your site where users will start HTTP Commander.
File includes openHTTPCommander(URL) javascript function.
Replace URL with correct HTTP Commander URL like 'http://yoursite/HTCOMNET/Default.aspx'.
- Contact Element-IT technical support if you have troubles with this.
Details — how it works
Let's explore openHTTPCommander JavaScript function in BasicLoginExample.html file.
First, it sends asynchronous HEAD request to the current web page, that is BasicLoginExample.html.
We add an "r" parameter to the current page with random value.
The request URL should look like this "BasicLoginExample.html?r=0.061323485323896254".
The value of the parameter does not matter, it's needed to force the browser to send the request
instead of returning a cached response.
JavaScript sets a special "X-HttpCommander-Auth" header that is processed by the HttpCommanderAuthModule.
When the module encounters the "X-HttpCommander-Auth" header in the request,
it returns the user name and password of the logged in user with "X-HttpCommander-Auth" header to the client.
JavaScript code reads the "X-HttpCommander-Auth" header from the response,
gets the user name and password of the user logged into the web site.
Using these credentials, JavaScript sends asynchronous an HEAD request to Default.aspx page
of HTTP Commander.
If the logged in user is allowed access to HTTP Commander,
authentication procedure succeeds.
Web browser opens HTTP Commander and log ins automatically.
-
Forms authentication on the other site: If you have a login page where users type their name and password,
then you can pass these credentials to HTTP Commander so users will be authenticated in it as well.
To authenticate the user, you need to send an AJAX request with the credentials to the application.
HTTP Commander has a working example page testSSO.html in the application root folder for user login via Form on page.
You can look at the code of the page and move it to your login Form or contact us to get help.
For testSSO.html page the only thing you need is to set anonymous authentication in IIS:
-
Copy and rename the file \testSSO.html (for example to login.html)
into a directory of your site.
-
Configure anonymous access for this file.
If you use ASP.NET, in IIS for this file enable only Anonymous Authentication,
and also in the web.config file add in configuration section next section:
<location path="your_new_name_for_testSSO.html">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
Screenshots
-
Open for editing the file testSSO.html. Find the line:
onclick="openHttpCommander(
and replace Default.aspx
with URL of HTTP Commander (for example http://yourdomainname/HTCOMNET/).
Save the file.
Screenshots
-
Check if it works. Open in a browser the testSSO.html page from your site.
Enter valid credentials and login.
If everything was correct, then HTTP Commander will be opened.
Screenshots
When I become authorized in SkyDrive I receive the "'evt_Login_onload' is undefined" error.
Answer:
This error can arise in Internet Explorer. For its elimination add in "Trusted sites" (on Security tab in IE options) the following urls:
https://auth.gfx.ms
https://live.login.com
https://signup.live.com
The Default.aspx page is incorrectly displayed.
If Default.aspx page is displayed incorrectly, as on a screenshot below
Screenshot
please check the following:
- Whether it is allowed to display CSS in the browser
- Whether check there is an Images folder with nonblank contents, Styles-min.css file in directory with HTTP Commander and whether is to them access (NTFS rights)
- Open in browser Images/resources_1.5/css/ext-all-notheme.css url
If you thus see Error HTTP 403.18 - Forbidden, then see FAQ I got the Error HTTP 403.18 - Forbidden...
-
Open page in Chrome browser, press F12 and click on Console tab in Developer tools.
Look, whether there are errors and what
I got the Error HTTP 403.18 - Forbidden when open files from Images/resources_1.5 folder
This error means that in IIS installed URLScan
ISAPI Filter and it is configured so that not allowed URLs in which path there are folders having in the name of a dots (parameter AllowDotInPath=0).
For the solution of this problem see how to configure URLScan Tool in IIS 7+ or in IIS 6.