Web client

 


It is a common situation when you are not at your workplace but you need some data urgently. In this case Internet access using a web browser might save you.

It is no doubt that you can develop a web interface for any system. To do this you need to develop, debug and deploy it as well as maintain compatibility with different web browsers. 1C:Enterprise platform allows developers to save efforts on the development of the web interface.

The platform allows you to publish the entire application that you have developed in this tutorial on a web server in a few clicks. After that, users will be able to access the application using regular web browsers. At the time of writing this book there are four supported web browsers, which are: Internet Explorer, Firefox, Chrome, and Safari.

This means that users do not need to install any of 1C:Enterprise applications or licenses, the only requirements are the connection to the Internet and any of the supported web browsers. At the same time, you need to have a server where 1C:Enterprise platform and a web server are installed. At the time of writing this book there are two supported web servers: IIS and Apache.

To install the web server, click Start, then click Control panel, and then click Uninstall a program. Click Turn Windows features on or off. In Windows Features, select Internet Information Services. The default set of features will do. Click OK to set up and close this window. 

Figure 14-1. Installing the Internet Information Services web server

To publish a web client, you need to have the Web server extension modules component of 1C:Enterprise platform installed. To install the component, click Start, then click Control panel, then click Uninstall a program, in the list of applications find 1C:Enterprise 8 (training version) (<version number>) and select it. The version must match the version that you use for publishing the application. Then click Change at the top of the list. In the installation wizard, select the Modify option and click Next

Figure 14-2. Modifying the 1C:Enterprise installation

On the next page select This feature, and all subfeatures, will be installed on local hard drive for Web server extension modules. After that, follow the wizard without changing the default settings. 

Figure 14-3. Installing the Web server extension modules component

Enabling access to the application through the Internet is simple. Open the application in Designer mode. On the Administration menu click Publishing on web-server.  

 

Figure 14-4. Opening the Publish on web-server wizard

In the Publish on web-server wizard, in the Name field, enter money, and in Directory field, ensure that the last folder is changed to money. Then click Publish

Figure 11-5. Publishing the application on the web server

The platform will ask for confirmations during publishing. Click Yes when needed. 

Figure 11-6. An example of the publication confirmation dialog

After the application is published, you can access it from any place around the world. To connect to the application you will need to know only its URL.

Note. Details of configuring web servers are skipped in this book. In short, you will need to grant the IIS_IUSRS user on the server access to 1C:Enterprise installation bin folder, to the folder that you have specified in the  Directory field of the Publish to web server wizard, and to the folder where your infobase is placed. Then you need to enable Anonymous Authentication in the Authentication settings of the money IIS application, and for 64-bit Windows you need Enable 32-Bit Applications to be set to True in advanced settings of the DefaultAppPool application pool.

In the tutorial you run it on your local computer, thus the URL will be local only. To log on, type http://localhost/money in the address bar of your web browser and you will see the 1C:Enterprise interface, with which you are already familiar.

Figure 11-7. Web client in Microsoft Internet Explorer

As it is said above, you can use your favorite web browser to work with your application.  

Figure 11-8. Web client in Chrome

Note: 1C:Enterprise training version has a set of limitations, thus you cannot protect it with the password because this feature is disabled for the training version. In addition, to log on using the web client you need to exit Designer mode first as there can be only one concurrent user in the training version. The limitations that have effect at the time of writing this book limitations are listed in 1C:Enterprise 8 (training version) chapter.

You can see live demo on 1C:Developer Network in Applications section.


Comments
0
Add comment