|
This document discusses preparing the Web Server for the deployment and runtime use of a Mobile RPG/Mobile RPG application or Browser Terminal. This document isn't required for importing display files and running test projects within Visual Studio (because Visual Studio includes its own Web Server for importing and testing).
Note that the server must have previously installed DataGate for IBM i, if you have not, Instructions can be found in the DataGate for 15.0 IBM i Readme.
This document assumes you're using Windows Server 2012 R2 or 2016 Standard (with GUI) default installation. If you are using Windows Server 2008 R2 SP1, refer to Preparing the Web Server (Windows Server 2008 R2 SP1)
See Also:
Security note: This document discusses preparing a Web Server for use in an intranet environment using the HTTP protocol. HTTP broadcasts data in the clear. HTTP should not be used for deploying Mobile RPG applications for use across the Internet. For some regulation-constrained organizations (such as those needing to comply with Sarbanes Oxley regulations) HTTP may also not be recommended for use with applications across your intranet. For these installations you'll need to use HTTPS (ie, secure HTTP) and that is beyond the scope of these instructions. Check with your security auditors for more on your specific needs. If you need HTTPS, this Microsoft Knowledge Base article discusses that configuration.
Note also that for most production applications your network will need firewall protection. Installing and configuring a firewall is beyond the scope of these instructions. Check with your network administrator and/or security officer for help and information about your organization's firewall and policies before continuing with these instructions.
These steps are required on the target Web Server before you attempt to deploy an ASNA .aspx application for wide testing or production use. Check for and install Microsoft updates (accessible from the control panel). It is critical that you have all Microsoft updates installed. From the Server Manager Dashboard, select option 2 to Add roles and features:
Receive the Before you begin dialog. Press the Next button to continue:
Select the first option: Role-based or feature based installation. Click Next:
Select your server from the server pool list and click Next:
Receive the Server Roles dialog screen:
Select the option to install Web Server (IIS) (you'll have to scroll down a bit):
When you select the Web Server (IIS) option, you will be prompted to add features that are required for Web Server (IIS). Select the include management tools option if not checked, and click the Add Features button:
Click the Next button:
Click on Next on the following screen:
The Select role services dialog screen is shown with the common IIS features pre-selected.
Scroll down to the Application Development services.
Select .NET Extensibility 4.5
Click on Add Features button.
Select ASP.NET 4.5
Click on Add Features button.
Click on Next:
Confirm your installation selections and click on the Install button:
The selected options will be installed:
Once the installation is complete, click on the Close button.
Check for and install any Microsoft updates now needed by the new features on the server.
We should now have everything needed to render a simple ASP.NET web site. Let's test our Web Server with a simple "Hello World" application written in C#. It is critical that we test a simple ASP.NET application to confirm that ASP.NET and IIS are configured and functioning properly before deploying a more complex application to the server.
Download the C# test application from: https://docs.asna.com/documentation/downloads/csTestApp.zipw
Create the folder CsTestApp under the c:\inetpub\wwwroot
folder using
Windows Explorer.
Unzip the zip file and put the contents into the c:\inetpub\wwwroot\csTestApp
folder.
Now let's start creating the test website.
From the Server Manager, click on Tools, then select the Internet Information Services (IIS) Manager:
Click on your server name. If you are prompted to start with the Microsoft Web Platform, answer No. (If you don't want to see the message again, select the option "do not show this message”)
Click on the small triangle next to the server name to expand its contents.
Select Application Pools
There are 3 existing application pools listed. We will create our own for our test.
applications. Right-click on Application Pools and select Add Application Pool…Name: TestPool
.NET Framework Version: .NET Framework v4.0.30319
Managed pipeline mode: Integrated
Start Application Pool immediately: Selected
Click the OK button.
Our test application pool is now created:
Next, (left pane) expand Sites, expand Default Web
Right-click on Default Web Site and select the option to Add Application
Alias: csTestApp
Application pool: select TestPool
Physical Path: select c:\inetpub\wwwroot\csTestApp
Click the OK button.
Click the option to Browse (http) the web application:
A web browser will appear (behind the IIS manager screen). Select the web browser.
You should see a screen similar to this:
Click the Click Me button.
If you see the confirmation message (above), then ASP.NET 4.5 is properly configured. You may close the browser.
If you receive an error message, go back through the installed features option to make sure you have selected all the necessary features. You may also need to put the error detail into an internet search engine (like Google.com) to search for the error message and the common causes and resolutions. Be sure to check the server's event log (using the event viewer) for a possibly more detailed error message.
We will need the Visual Studio 2017 Community Edition to test our connectivity to DataGate 15.0 for IBM i. If you are not comfortable with Visual Studio 2017 Community Edition on the Web Server, you can always uninstall it after you are satisfied that the Web Server and Mobile RPG components are properly installed and configured.
Download and install the Visual Studio 2017 Community Edition:
Navigate your browser to https://docs.asna.com
You must have an account and be logged in the site to download DataGate WebPak 15.0. If you do not have an account, please create one, or log into the site with your existing account.
Once logged in, navigate your browser to:
https://docs.asna.com/downloads/Pages/ASNAWings90.aspx
Select the small computer next to "ASNA DataGate WebPak" to begin downloading the ASNA DataGate WebPak 15.0. (Note: the ASNA WebPak 15.0 is to be installed on the Web Server only. Do not attempt to install it on a developer's machine.)
Run the ASNA DataGate installation program. Click on Begin.
The installer will check that all prerequisites have been met. Click Next
Click Accept to accept the ASNA Software License Agreement
There is no need to customize the installation. Click Next.
Press the Install button to begin the installation.
And finally the completion screen. (No reboot necessary)
Start the ASNA Registration Assistant.
Expand the DataGate section. Select the 15.0 WebPak. Note the 15.0 WebPak comes with a 30 day trial license. You can use this trial license, or apply a permanent 15.0 WebPak license when purchased.
Previously we set up a simple ASP.NET web site to confirm IIS and ASP.NET 4.x. Now let's run a simple application to confirm the Monarch Framework 9.0 is installed and configured properly.
Download the test application from: https://docs.asna.com/documentation/downloads/wTestApp.zip.
Create the folder wTestApp under the c:\inetpub\wwwroot
folder using Windows Explorer.
Unzip the zip file and put the contents into the c:\inetpub\wwwroot\wTestApp
folder.
Go back into the Internet Information Services (IIS) Manager.
Click Next, (left pane) expand Sites, expand Default Web Site.
Right-click on Default Web Site and select the option to Add Application.
Alias: wTestApp
Application pool: select TestPool
Physical Path: select c:\inetpub\wwwroot\wTestApp
Click the OK button.
Click the option to Browse (http) the web application:
A web browser will appear (behind the IIS manager screen). Select the web browser.
You should see a screen similar to this:
Click on the Click Me button.
If you see the confirmation message (above), then the Mobile RPG 9.0 Framework is properly configured. You may close the browser.
If you receive an error message, make sure you are logged in as the administrator and repair your WebPak installation. You may also need put the error detail into an internet search engine (like google.com) to search for the error message and the common causes and resolutions. Be sure to check the server's event log (using the event viewer) for a possibly more detailed error message.
To test connectivity from the Web Server to DataGate 15.0 for the IBM i, start Visual Studio 2017 and select DataGate | DataGate Explorer.
Right-Click on the Database Names Section and select: Add New Database Name
(Database name - A programmer-assigned name for this database connection. Used by the DBName parameter of the DclDB object)
The advanced options allow you to change more detailed properties. In general, you should not need to change these unless directed by ASNA Technical Support. The common property that is changed in the advanced section is the port number. (For those installs not on the default port 5042)
Once you have entered your database name details, click on the Test Connection button to test the connection. You should see the following screen:
If you do not see a Test connection succeeded message, you should receive an error notifying you of any incorrect or invalid settings. Please correct these settings and try the test connection again.
Press OK (twice) to save your database.
Enter a name for this connection and press enter. (You can always change the name or properties later.)
Right-click on the database name and Select Open Connection. You should see a screen similar to the following listing your libraries:
We have now confirmed the connection from the Web Server to DataGate 15.0 for IBM i.
Copyright 2015-2017 ASNA. All rights reserved. |