Website or application developers should know that web server configuration sets up a website on the server and sets relevant parameters. Multiple websites can be established on one web server. The owner of each website only needs to place the completed web pages and related files on the webserver website, and other users can use the browser to access the web pages on the website. Thus, here comes to the question of how to configure the webserver? XRCLOUD will share with you a detailed tutorial on web server configuration.
DataCollection Web Service Installation
Install Internet Information Service (IIS)
To install Internet Information Services (IIS), please follow the steps below:
Start>Control Panel>Programs and Features
Click "Turn Windows features on or off." Then the Windows function window will appear.
Make sure to select all functions under "Internet Information Services" and "Microsoft .NET Framework."
Click "OK" to install the selected Windows components, including IIS.
To access IIS, click the Windows "Start" button. The start menu/screen appears. Start typing Internet Information Services Manager in the search field, and then click the Internet Information Services (IIS) Manager that appears.
The Configuration of Windows Server 2012
The following items are the minimum requirements for the correct operation and installation of DataCollection Web Service on Windows Server 2012. To change these settings, open "Server Manager"> "Roles" and confirm that the web server (IIS) is installed. Review the details below and make sure all the items below are selected on the server.
After selecting all necessary roles and functions, click the "Next" button to confirm the selection. Click the Install button to install the selected roles and features on the server.
Install DataCollection Web Service
To install DataCollection Service on your computer/server, please follow these steps:
Locate the DataCollection Service installer file and double-click it.
The "Data Collection Service" wizard will appear. Click the Next button to continue.
Accept the End- User License Agreement and click "Next" to continue.
The next page of the wizard allows you to change the directory where the DataCollection service is installed. SalesPad recommends accepting the default directory. Click Next to accept your changes and continue.
Web.Config settings page allows custom web.config file (default location is C:/inetpub/wwwroot/DataCollectionService/web.config). Enter the SQL Server's name or IP address hosting the GP database in the database server field. Enter the name of the database in the required field. By default, the service name is DataCollection Service, but you can change it as needed. Further, the service login is used for recording purposes and can be left as it is.
The IIS installer page allows you to customize the website that will run the DataCollection Service.
DataCollection Service is the default website name, but it can be changed as needed (please note that the folder name in step 4 will not change with the website name, but must be updated manually). The default website port is 5501, which should only be changed when other applications are using it. By default, DataCollection Service uses a custom application pool identity, although it can be changed manually in the future. The credentials should have Windows and SQL Server administrator rights.
Application pool username-Windows username with administrator rights
Application Pool Password-Windows username and password
Application Pool Domain-the Windows domain to which the application pool username belongs
Click "Next," and the installation wizard will install DataCollection Service. Click Finish to exit the installer.
DataCollection Web Service Installation Check
Please note that : This part is optional. You can complete the installation of DataCollection Service without running the installation check in this section. SalesPad recommends referring to this section only for troubleshooting purposes.
To perform a DC service check:
Use an Internet Web browser to navigate to http://localhost:5501/, and replace localhost with the IP address of the computer/server hosting the DC service. If the port number is changed during the installation process, please replace 5501 with the modified port number. You should greet the MobileCommunicationService page, and you can safely conclude that the Internet Information Service (IIS) is working correctly, and the DataCollection Service successfully responded to the authentication request.
Another way to check whether the DC service is set up and running is to do it directly from the IIS Manager. Open the Internet Information Services (IIS) Manager and right-click the DataCollection Service website (the name may be different, depending on the previous settings) ,click "Manage Website"> "Browse". This option will open the web browser and automatically go to http://localhost:5501/. If the request is successful, you should see the MobileCommunicationService page. This option will open the web browser and automatically go to http://localhost:5501/. If the request is successful, you should see the MobileCommunicationService page.
DataCollection Web Service Configuration
Chnage the database connection string
The DataCollection Service installer will configure the DC service for you, including the SQL Server and database to be used. However, sometimes these values need to be changed later. You may want to modify the web.config file for two reasons:
1.You need to change the SQL Server or database that the DC service needs to connect.
2.You don't want to use a custom application pool ID, but instead, directly specify a user name and password.
Change SQL Server and database
It's easy to modify the web.config file! Please follow the following steps:
In the virtual folder where the DC service is installed (the default is C:/inetpub/wwwroot/DataCollectionService), find the web.config file.
Right-click it and select the "Edit" option, and then select an editor (such as "Notepad") to edit the file. Make sure not to choose the option always to use this program to open this file type.
Find the connection string part and replace the default server and database with values specific to your GP company. Save changes and close the page.
Change the Application Pool Identity
If you do not want to use the custom application pool ID set by the installer, please do the following steps :
In the virtual folder where the DC service is installed, find the web.config file. Right-click it and select the "Edit" option, and then select an editor (such as "Notepad") to edit the file. Make sure not to select the option always to use this program to open this file type.
Find the connection string part, and then set the trusted_connection option to False.
Add user and password options after trusted_connection, and specify the user name and password used to log in to SQL Server. Please note that these credentials are not the username and password set in DataCollection, but the SQL Server login credentials. Save changes and close the page.
Open Internet Information Services (IIS) Manager, and then select "Application Pool" on the left.
Select the DataCollection Service application pool from the list on the right, right-click, and select "Advanced Settings."
The "Advanced Settings" window will open. Select the "Identity" option under the "Process Model" heading and click the ellipsis (...) button on the right.
The "Application Pool Identification" window will open. Select the built-in account radio button, and then select the ApplicationPoolIdentity option from the drop-down list.
Click "OK" to accept the changes, and then click "OK" again to close the Advanced Settings window. Right-click the application pool, select "Stop," and then select "Start" to restart the application pool.
Create Multiple Companies
The DataCollection Service installer will install and configure a DC service connected to a GP company database. Rerunning the installer will give you the option to repair or uninstall the existing DC service, but you will not be able to install another instance of the service. In the IIS root folder (C:/inetpub/wwwroot by default), select the DataCollectionService folder, right-click and select "Copy". Right-click again anywhere in the wwwroot folder and click "Paste." Then, a copy of DataCollectionService will be created.
At this point, it is best to rename the folder to a more meaningful name, such as DataCollectionServiceMultibin, DataCollectionService2, or DataCollectionServiceTest.
Open Internet Information Services (IIS) Manager, right-click "Sites" and select "Add Site."
The "Add Site" window will open. Enter the site name ( please note that the application pool will be created automatically), and then select the folder from step 1 as the physical path. Enter the port number (ex: 5502). Click "OK" to create the website.
The website will automatically create a new application pool, but it needs to be configured correctly. Select "Application Pool" on the left, select the newly created application pool on the right, right-click, and select "Advanced Settings."
In the "Advanced Settings" window, make sure. NET Framework version is set to 4.0, 32-bit application enabled is set to True, and identity is set to ApplicationPoolIdentity or custom identity.
Click “OK” to accept your changes and close the window.
Select the DataCollection website under "Sites" and then double-click the "Default Document" icon under the "IIS" section.
With the DataCollection website still selected, click "Add" on the right.
Enter DataCollectionWebService. svc enter the text field and click "OK" to add the default document.
Finally, test the new DC service by right-clicking on the website "Manage Site"> "Browse." It should give you a MobileCommunicationService page.
Web Service Record
You can enable web service logging for troubleshooting. By default, logging is turned off. SalesPad recommends setting the logging function as the default setting unless the SalesPad staff instructs you to enable it. The file label in the log4net section of the web.config file determines the path and file used to write all logging output. The default output is set to C:/temp/log-file.txt
To enable logging for DataCollection Service, open the web.config file in a text editor (such as Notepad), uncomment the two commented out parts of the log4net tag, and then save the changes.