Microsoft IIS as the Web Server for the Web Interface

From RangerMSP Wiki - PSA software for MSPs and IT services providers
Jump to: navigation, search

Introduction

Supported versions: RangerMSP 9 and up.

Using IIS as the Web Server for the RangerMSP Web Interface is totally optional and not mandatory. It is required mostly if the Web Interface should be used over SSL connections.

Web Interface still can be used without IIS back end as a Windows service.

Uninstalling CRM Web Interface Service

(Note: only if it was used as a service before)

‘CRM Web Interface’ Windows service should be stopped on your server and then uninstalled (It is no longer needed when using IIS as the Web server).

You can learn how to uninstall CRM Web interface service here.


Enabling RangerMSP for IIS

Rename file \RangerMSP\WebInterface\IISOFF.cmt to IIS.cmt to enable IIS for RangerMSP Web Interface.


Installing IIS on your Server/PC

In case you do not have IIS installed please refer to Microsoft Website here for full instructions on how to install, configure and test IIS on your server/PC.

Enabling ISAPI

After IIS is running successfully on your server you should add ISAPI support to it. Please visit this page on a Microsoft Website for all details.


Configuring RangerMSP Web Interface in IIS

Run Internet Information Services (IIS) Manager (Usually accessed from the Windows > Administrator Tools menu).

Creating an Application Pool for RangerMSP Web Interface.

1.1 Select Application Pools and then Add Application Pool:

Web IIS add application pool.png


1.2 Set the name to ‘CRM Web Interface’, select No Managed Code and click on OK button:

Web IIS add application pool 2.png


1.3 Right click ‘CRM Web Interface’ application pool in the list and choose Advanced Settings:

Web IIS application pool settings.png


1.3.1 In order to support 32-bit application on 64-bit Windows you must set Enable 32-bit Applications to True (see the first circled option in the screenshot below).

1.3.2 Select the Identity and set it to a custom account (see the second circled option in the screenshot below).

NOTE: The user account you set here must be a privileged user with full access rights and all privileges to the entire RangerMSP folder tree, among others.

Web IIS application pool settings2.png

Creating an application in IIS

2.1 Right click the Default Web Site (In case you do not use it for anything else) - or - create an entirely new Web Site and then right click it.

2.2 From the menu that opens choose Add Application:

Web IIS add application.png


2.3 In the window that opens (see below) configure the following:

2.3.1 Set Application Alias to CRM (see the screenshot below).

2.3.2 Select the Application pool CRM Web Interface by clicking the Select button (see the screenshot below).

2.3.3 Set the Physical path to the \RangerMSP\WebInterface folder on this server. For example: D:\RangerMSP\WebInterface (see the screenshot below).

2.3.4 Click on "Connect as..." button and set a specific user for the application.

NOTE: The user you set here must have full access rights and all privileges to the entire RangerMSP folder tree, among others.

Web IIS add application 2.png


Once the user is set, click on the button "Test Settings...". It must succeed. In case it does not, verify that the selected user has full NTFS permissions (aka the ‘Security’ tab) to the selected Physical path.

Web IIS add application 3.png


Enabling ISAPI Modules in IIS

Recommended video:  ISAPI configuration video

3.1 Select your newly created CRM application and then double-click on the "Handler Mappings" icon:

Web IIS application settings 1.png


Note that CGI-exe and ISAPI-dll are disabled. To enable them, click on the link "Edit Feature Permissions...":

Web IIS application settings 2.png


Select the "Execute" checkbox and click the OK button:

Web IIS application settings 3.png


3.2 Select ISAPI-dll and click ‘Edit’:

Web IIS application settings 4.png


The following window will open, set the value for “Executable” field to the point to file <installation_folder>\WebInterface\CRM.dll on this server.


For example:

D:\RangerMSP\WebInterface\CRM.dll

Web IIS application settings 5.png


Click OK.

The following message may pop.

Click ‘Yes’ to allow:

Web IIS application settings 6.png

Add Default Document page

Select your newly created CRM application and then double-click on the "Default Document" icon:
Web iis application set default document.png

Click Add to add Default Document and type CRM.dll:

Web iis application add default document.png


Local Test

Inside IIS Manager, select CRM application, switch to "Content View" (at the bottom), right-click CRM.dll file and select "Browser".
Or

Open the browser on the server and go to the following URL: http://localhost/CRM/CRM.dll

As a result the login window for RangerMSP Web Interface should open in your Browser:

Web IIS test connection.png


Web Links in Emails

Web Links refer to email Alerts being sent via RangerMSP Alerts Server.

When Web Links are enabled under Tools > Options > Web Interface tab, the system will add a link to the relevant entity in the email alert body. See more details in Web Links in Emails.

When using Web Interface with IIS, the following tokens should be added in the file <server>\RangerMSP\WebInterface\CRMWebInterface.ini under the [Pref] section:


ServerIP=<your_server_IP_or_URL>
(for example: ServerIP=212.140.210.143 or ServerIP=www.mydomainname.com)

IISCustomPort=<custom_port_set_for_IIS_application>\CRM.dll
(for example: IISCustomPort=4961/CRM.dll or IISCustomPort=8080/CRM.dll

IISCustomIP=<your-server-URL>:<custom_port_set_for_IIS_application>\CRM.dll
(for example: IISCustomIP=212.140.210.143:4961/CRM.dll)

When IIS is configured with SSL, the token IISCustomIP should contain HTTPS, for example:
IISCustomIP=https://212.140.210.143:4961/CRM.dll

Restart 'CRM Server' service on your server (e.g. not the Web interface) - so the change will affect emails sent by Email Connector and Alerts Server.

Troubleshooting

1. In case the following error is shown in the Browser you should grant full permissions and all access rights to the user the application is running under (Step 2.3.3 above) so they can access the local folder of Windows/Temp

Web IIS temp folder error.png


2. In cases where you move RangerMSP to another server (or another folder on the same server) the following (single!) file must first be deleted - <server>\RangerMSP\WebInterface\web.config Then configure the application again and select the relevant new physical paths.


3. In case of HTTP error 500.19 Internal Server Error with error code 0x8007007e:

Open Windows Command Prompt as Administrator and run the following command:

 %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']


4. In case of HTTP Error 403.14 - Forbidden. The Web server is configured to not list the contents of this directory. :

Verify the URL you are trying to access and test with the following URL: http://localhost/CRM/CRM.dll


5. In case of HTTP Error 503. The service is unavailable when trying to access Web Interface and Application Pools stops

  • In most cases it is related to the Windows account IIS is configured to run under or to a wrong password - please re-enter the Windows account credentials for IIS (username and password) for the pool - see #2.3.4.
  • When using Windows 64-bit, under the advanced settings of the Application pool running 32-bit applications should be enabled.

See #1.3.1 and #1.3.2 and following links:

http://blogs.technet.com/b/sbs/archive/2011/04/07/how-to-run-a-32bit-web-application-on-sbs-2008.aspx

http://blog.v1corp.com/2010/08/17/iis-errors-when-running-32-bit-application-pools-on-sbs-2008/


6. My logo is not shown in the Web Interface Verify that HTML link for the logo image is as follows : <img src="../Files/mylogo.jpg"> in the Header and Footer files:

Header: <Installation_DIR>\RangerMSP\WebInterface\Files\MyOfficeSetting1.txt Footer: <Installation_DIR>\RangerMSP\WebInterface\Files\MyOfficeSetting2.txt

For mobile mode: Header: <Installation_DIR>\RangerMSP\WebInterface\Files\MyOfficeSettingMobile1.txt Footer: <Installation_DIR>\RangerMSP\WebInterface\Files\MyOfficeSettingMobile2.txt


7. Session timeout is too short

If a user doesn't perform any action within a specified period of time his session expires and he needs to reenter the system.
The default timeout value is 180 minutes and it can be increased by editing the TimeOutAmount value in file <Installation_DIR>\RangerMSP\WebInterface\CRMWebInterface.ini In addition the timeout should be set in IIS in two places:

(1) Under Advanced settings for the application pool:

Web IIS timeout settings1.png AND -

(2) Under the web site - Advanced Settings:

Web IIS timeout settings2.png

RESTART IIS to apply the change.


See Also