Jump to: navigation, search

Configure Microsoft IIS for UBIK


Revision as of 12:36, 17 February 2017 by LGE (Talk | contribs)

IIS Manager
IIS Manager

The web server can be configured using the Internet Information Services (IIS) Manager console, which provides a graphical user interface to manage and configure the web server accordingly for the UBIK® web service.

Add Application Pool

An application pool is a group of one or more URLs that are served by a worker process or a set of worker processes. Application pools set boundaries for the applications they contain, which means that any applications that are running outside a given application pool cannot affect the applications in the application pool.

IC Attention.pngIf a local user is used it must be set at the Identity parameter of the Application Pool.

Certificate

A secure connection between the UBIK® clients and web service requires a SSL certificate on both, the server and client. This certificate can either be a root authority certificate, a self-signed or any other public key certificate from a certificate authority enabling a secured connection between the web service and the clients.

A new self-signed certificate can be created in the Internet Information Server (IIS) Manager, exported using the export function and sent to the development team. As already mentioned, the client has to know this certificate as well, hence it need to be integrated it into the mobile application.

IC Attention.pngUBIK® requires a valid certificate for SSL encryption!



Bindings

Web sites and services have something called Server Bindings which represent the underlying address, port, and potentially a host header that the website is accessed using. The UBIK® client accesses the web service via a secured port (https), where it is necessary to configure the appropriate certificate.

For Android Clients

For WinX and Web-Client


Configure compression

Web service responses can be compressed in order to improve performance and reduce web traffic. This can be easily done from the web server side in IIS manager.

IC Hint square.pngIn case the compression modules are not yet installed, please refer to [this] for instructions.
  • It is possible to configure when to compress service responses like shown in Figure.3. The "dynamicCompressionDisableCpuUsage" tells the service to stop compressing when the CPU load reaches above 90%; And the "dynamicCompressionEnableCpuUsage" tells the service to start compressing when the CPU load drops below 50%. These parameters should work well in most cases but can be modified if necessary;
  • UBIK® service responses are in formats of either "text/xml"(text/*) or "application/json". So just make sure they are configured to be compressed like shown in Figure.4. If there are no such entries, just right click and add them accordingly;
  • There are 10 different levels of compression, ranging from 0~9 where 9 is most CPU intensive but produces the best compress rate. The default level is 0 and this can be changed (e.g. to level 9) with the following command (need to run the Windows console as an administrator first):
C:\Windows\System32\Inetsrv\Appcmd.exe set config -section:httpCompression -[name='gzip'].dynamicCompressionLevel:9

Here are some test results of the transferred content size and duration under different compression levels.

Compression Level Meta Definitions One Content Level Branch Download
Level 0 4,732,058 bytes 23,470 bytes 318,847,597 bytes (9 minutes)
Level 4 3,050,115 bytes 7,915 bytes 79,384,336 bytes (5 minutes)
Level 9 2,851,318 bytes 5,681 bytes 48,037,714 bytes (4 minutes)

Ideally, one should always use level 9. However, if the server is not powerful enough and is already struggling with high CPU load without compression, one can use some lower compression level. In a lot of cases, level 4 offers a good leverage.

Create new Web Application

In the IIS Manager expand the Default Web Site node and navigate through the folder structure to the folder containing the UBIK® web service components.

Optional: Local IIS User

Create and use a local user on the web server if no appropriate domain-user is available.

IC Attention.pngThe user has to be able to copy the customizing to its local user data directory on the machine! Hence, it also needs appropriate user permissions to the UBIK® data share.



Additional prerequisites

  • Ensure that the service ports are not blocked by a firewall.
  • Ensure that port forwarding is established if needed (e.g. for Microsoft Azure Virtual Computers or servers behind a gateway)

Testing the Web Service

Test the web service by entering the following URL in a browser: https://<SERVER-IP>[:<PORT>]/<PATH-TO-UBIK-WEBSERVICE>/UBIKContent.svc/GetVersion

See also