Enabling and Configuring IIS and ASP .NET Framework 4.5 or Higher
Note: Make sure to enable and configure Internet Information Services (IIS) and the ASP .NET Framework 4.5 or higher on Windows server.
IIS comes with Windows Server, but it is not installed or enabled by default. Installing and enabling IIS allows you to use your Windows machine as a web server. Clients, like LEC AIM, can then communicate with the Windows machine using HTTP or HTTPS.
After IIS is enabled, it needs to be configured. Use the following steps to enable IIS for .NET Framework 4.7. The menu text might look different if you are using another version of .NET Framework on your system.
Enabling Windows Internet Information Services (IIS)
If IIS is not enabled on your Windows machine follow these steps:
- On Windows Server, open the Server Manage and select Local Server.
- Select Manage and then select Add Roles and Features.
- When the Add Roles and Features wizard opens, click the Server Roles tab and check the Web Server (IIS) box. The default values provide all the functionality LEC AIM needs.
- Click the Features tab and check the .NET Framework 4.x Features box. The default values provide all the functionality LEC AIM needs.
- Select Next and then select Install.
- The status, Windows completed the requested changes, will display when IIS is successfully enabled.
- Select Manage and then select Add or Remove Features .
- Click Next until the Server Roles menu item is selected.
- In the Roles list, navigate to the Web Server (IIS) and expand the sub-menu items.
- Find Web Server and expand the Application Development sub-menu.
- Select the latest version of ASP.NET. This will automatically select any necessary dependencies.
- Click Next twice and then click Install.
- After you see a successful installation message, restart the computer.
- Open an internet browser to http://localhost/ and you should see the default Windows IIS page.
Configuring IIS
- Open the IIS Manager from the Windows Start menu.
- Select the local machine in the Connections panel.
- At the bottom of the IIS manager select Content View.
- From the center panel, click Sites. You will see the Default Web Site icon.
- Right-click the Default Web Site node to start it if it has not already started.
- If a secure connection is required, set up Secure Sockets Layer (SSL). For more information, see Microsoft’s How to: Set Up Secure Sockets Layer (SSL).
Running SetupAIMIIS.bat
To give LEC AIM users permissions to access all necessary LEC files (Python files and DLL files) through IIS, you must run the SetupAIM.bat
script that is included with the installation package.
- Open a Command Prompt as an administrator.
- Navigate to
\Program Files\LiveEnergyConnect\AimIIS
and runSetupAimIIS.bat
on Windows.Note: If you use the Set-ExecutionPolicy RemoteSigned option when running this batch file, the web server will only run scripts that have been signed by a trusted publisher.
- Review the output of the batch file to ensure all files are processed without error.
Configuring DCOM Permissions
Note: The Live Energy Connect product was formerly known as LiveData Utilities RTI Server. Certain files in the IIS configuration process contains references to LiveData.
Use the following steps to configure DCOM permissions for the LiveData.config
file.
- From the Windows Start menu, open Component Services.
- In the Component Services dialog box, navigate to Component Services, Computers, My Computer, and then DCOM Config.
- Right-click LiveData.Config and select Properties from the pop-up menu to display the Properties dialog box, and click the Security tab.
- In the Launch and Activation Permissions section, click Customize.
- Click Edit to display the Launch and Activation Permission dialog box.
- Click Add to display the Select Users or Groups dialog box.
- With the current machine selected in the From this location field, type IIS AppPool\AimIIS in the Enter the object names to select text box.
- Select Check Names and click OK and confirm the AimIIS user was added to the list of users.
- Select all check boxes under the Allow column to give the AimIIS user all permissions listed under Permissions, and click OK.
- Give the AimIIS user full control over Access Permission.
- Under Access Permissions, select Customize and click Edit.
- In the Access Permission dialog box, repeat steps 5 through 9 for Access Permissions.
- Under Configuration Permissions, select Customize and click Edit.
- In the Configuration Permissions dialog box, repeat steps 5 through 9 for Configuration Permissions.
Note: You will not be able to select Special permissions under Permissions for AimIIS when you repeat step 8. However, the AimIIS user does not need special permissions.
- Click Apply.
- Click OK.
Verify AIM IIS Configuration is Working
You will need to verify the AIM IIS configuration is working using the following steps:
- Ensure your LEC Server is running.
- Make a request to the Aim IIS app to verify you can make a request to read a point on the LEC Server using the following format (text in bold font indicates values specific to your configuration):
http://AimServiceIpAddress:AimServicePort/AimIIS/AIMService.asmx/getPointValue?vmd=VmdName&port=LecSoapPort&point=PointLabel&apikey=
AimServiceApiKey
For example:
http://localhost:80/AimIIS/AIMService.asmx/getPointValue?vmd=OMS_for_SCADA&port=8090&point=OMS_For_SCADA_AssocControl&apikey=LiveDataUserKey
This URL would request a read of the value for the point called OMS_For_SCADA_AssocControl in the VMD called OMS_for_SCADA on the LEC Server that is running on the local machine listening on SOAP port 8090 for requests from the Aim IIS app.
Note: If you get an internal server error from IIS when you make a request, check the security settings in the directory at C:\Windows\Temp\gen_py, and if necessary, manually add modify/read/write privileges for the IIS AppPool\AimIIS user in that directory. If you need or want to change the default value of the API key used by the AIM IIS app, you can modify the value of the API key used by specifying a different value of the "WebServiceKey=" parameter in the srvxnt.ini file located in the C:\ProgramData\LiveEnergyConnect\ directory after a typical install.