WEBfactory 2010

Running WEBfactory 2010 on three separate machines

WEBfactory 2010 3.6 Service Pack 1 (or higher) can be set up to run its server, database and web server on three different machines which communicate with each other over the network. This article will describe the setup procedure for achieving this multiple-machine WEBfactory 2010 environment.

Capture4241.jpg

The goal to be achieved in this article is running WEBfactory 2010 in the following configuration:

  • Machine 1: WEBfactory 2010

  • Machine 2: Database server (Microsoft SQL Server 2014)

  • Machine 3: Web server (IIS)

To achieve this goal, the following prerequisites must be met:

This article focuses on setting up WEBfactory 2010 3.6 to work on a three machines environment. The installation of operating systems, WEBfactory 2010 software, database server or web server is not subject for this article. Please refer to the proper documentation to achieve the setup required for following this article.

Getting started with WEBfactory 2010

Setting up the triple-machine environment

Before beginning setting up the three machines, make sure that IIS is up and running on the Web Server machine, the SQL Server is up and running on the Database machine and WEBfactory 2010 is up and running on the WEBfactory 2010 machine.

Setting up the database

The first step is to establish communication between the WEBfactory Server and the database:

  1. On the Database machine, use the SQL Server Configuration Manager to enable the TCP/IP protocol. This will enable the communication between WEBfactory 2010 and the SQL database over the network using the TCP/IP protocol.

    Capture4242.jpg
  2. Also make sure that the communication is allowed by the Windows Firewall (or any other firewall) for the 1433 port.

    Capture4243.jpg
  3. On the WEBfactory 2010 machine, start WEBfactoryStudio.

    1. At the login dialog, use the Database server drop-down to select the Database machine (DATABASE-PC in our example) as the source database server.

    2. Select SQL Server Authentication from the Authentication drop-down.

    3. Provide the SQL User ID and Password.

    4. At the Database drop-down select a database (one that already exists on the Database machine) or select the option to create a new one.

    5. Click Login to connect WEBfactoryStudio to the remote database.

    Capture4244.jpg
  4. WEBfactoryStudio will display the Default database connection dialog which asks if the current database should be the default database used by WEBfactory Server. Click Yes to confirm.

    Capture4245.jpg

    The database can be also set as default Server database using the DNS Builder dialog from the Database Access settings of WEBfactory Studio.

    Capture4246.jpg
  5. Once the default database for the Server is set, use the Registry Editor to export the DSN registry key from HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\WEBFACTORY\WFSERVER\2.00\Settings. The resulted .REG file contains the DSN key.

    Capture4247.jpg
  6. On the Web Server machine, copy the previously exported .REG file and import it in the registry by double click-ing the file. Confirm the Registry Editor dialog. The key will be added to the registry on the Web Server machine.

    Capture4248.jpg
Setting up the WEBfactory 2010 Server communication

The WEBfactory 2010 Server communication must be adjusted to work over TCP.

  1. On the WEBfactory 2010 machine, open the Scada.CommunicationManager.Server.exe.config file located at C:\Program Files (x86)\WEBfactory 2010\Server\CommunicationManager\ using a text editor.

    Capture4260.jpg
  2. Locate the CommunicationWebClientService service and un-comment the TcpEndpoint endpoint, marked with green in the sample below:

    <service behaviorConfiguration="CommunicationServiceBehavior" name="Scada.CommunicationManager.Server.CommunicationWebClientService">
    	<!--<endpoint address="net.tcp://localhost:4600/Scada/CommunicationWebClientService" binding="netTcpBinding" bindingConfiguration="LargeBufferTcp" name="TcpEndpoint" contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService" />-->
    	<endpoint address="net.pipe://localhost/Scada/CommunicationWebClientService" binding="netNamedPipeBinding" bindingConfiguration="LargeBufferNamedPipe" name="NamedPipeEndpoint" contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService" />
    </service
  3. Locate the TraceContributorService service and un-comment the TcpEndpoint endpoint, marked with green in the sample below:

    <service behaviorConfiguration="CommunicationServiceBehavior" name="Scada.CommunicationManager.Server.TraceContributorService">
    	<!--<endpoint address="net.tcp://localhost:4600/Scada/TraceContributorService" binding="netTcpBinding" bindingConfiguration="LargeBufferTcp" name="TcpEndpoint" contract="Scada.CommunicationManager.Contracts.ITraceContributorService" />-->
    	<endpoint address="net.pipe://localhost/Scada/TraceContributorService" binding="netNamedPipeBinding" bindingConfiguration="LargeBufferNamedPipe" name="NamedPipeEndpoint" contract="Scada.CommunicationManager.Contracts.ITraceContributorService" />
    </service>

    Optionally, the port 4600 exposed by the communication manager for web services can be modified. If so, the modification should be done for both CommunicationWebClientService and TraceContributorService services.

  4. Allow the Scada.CommunicationManager.Server.exe located at C:\Program Files (x86)\WEBfactory 2010\Server\CommunicationManager\ to communicate through the firewall, as it needs inbound connections to the default port 4600 (or to the custom port if modified above).

    Capture4261.jpg
  5. Start the WEBfactory Server using the WEBfactory 2010Service Manager.

    Capture4262.jpg
Deploying the web services

Next, the WEBfactory web services must be deployed on the Web Server machine.

  1. From the WEBfactory 2010 machine, copy the _SERVICES folder and the clientaccesspolicy.xml file located at C:\inetpub\wwwroot and place them in the same folder on the Web Server machine (C:\inetpub\wwwroot).

    Capture4250.jpg
  2. The WEBfactory Application Pool needs to be created in order to be used by the web services copied at the previous step. On the Web Server machine, open the Internet Information Services (IIS) Manager and select the Application Pools item from the Connections panel.

    Capture4251.jpg
  3. Right-click in the Application Pools page and select Add Application Pool... (or use the Actions panel to select the same option).

    Capture4253.jpg
  4. In the Add Application Pool dialog, name the new application pool WEBfactory_AppPool and click OK to confirm.

    Capture4254.jpg
  5. Back in the Application Pools page, select the new WEBfactory_AppPool and click the Advanced Settings... option from either the contextual menu or the Actions panel. Set the following properties of the new application pool as follows:

    • .NET CLR Version (.NET Framework Version): v4.0

    • Enable 32-Bit Applications: True

    • Queue Length: 4000

    • Identity: NetworkService

    Capture4255.jpg

    Click OK to confirm the application pool settings.

  6. Now the new WEBfactory_AppPool needs to be applied on the Default Web Site. Select the Default Web Site from the Connections panel and click on the Basic Settings... option from the Actions panel.

  7. In the Edit Site dialog, click on the Select... button from the Application pool area to select the new application pool.

    Capture4256.jpg
  8. In the Select Application Pool dialog, select the WEBfactory_AppPool and confirm the two opened dialogs by clicking the OK buttons.

    Capture4257.jpg
  9. Next, the folders under _SERVICES must be converted to applications using the application pool created before. Expand the _SERVICES folder, right-click the first folder (DemoProject) and select Convert to Application.

    Capture4258.jpg
  10. In the Add Application dialog, the WEBfactory_AppPool is selected by default as it has been set the default application pool for the Default Web Site. Click OK to convert the folder to application.

    Capture4259.jpg
  11. Repeat steps 9 and 10 for all the folders available under the _SERVICES folder and for the WCF and Handlers folders under WEBservices.

Setting up the web services communication

The web services communication must be also configured to work over TCP.

  1. On the Web Server machine, open the Web.config file located at C:\inetpub\wwwroot\_SERVICES\WEBservices\ using a text editor.

    Capture4263.jpg
  2. Locate and comment out the net.pipe client endpoint for the CommunicationWebClientService:

    <endpoint address="net.pipe://localhost/Scada/CommunicationWebClientService" binding="netNamedPipeBinding" bindingConfiguration="LargeBufferNamedPipe"
     	name="Scada.CommunicationManager.Contracts.ICommunicationWebClientService" contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService" />
  3. Locate and comment out the net.pipe client endpoint for the TraceContributorService:

    <endpoint address="net.pipe://localhost/Scada/TraceContributorService" binding="netNamedPipeBinding" bindingConfiguration="LargeBufferNamedPipe"
    name="Scada.CommunicationManager.Contracts.ITraceContributorService" contract="Scada.CommunicationManager.Contracts.ITraceContributorService" />
  4. Locate and un-comment the net.tcp client endpoint for the CommunicationWebClientService:

    <!--<endpoint address="net.tcp://localhost:4600/Scada/CommunicationWebClientService"
                    binding="netTcpBinding"
                    bindingConfiguration="LargeBufferTcp"
                    name="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"
                    contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService" />-->
  5. Locate and un-comment the net.tcp client endpoint for the TraceContributorService:

    <!--<endpoint address="net.tcp://localhost:4600/Scada/TraceContributorService"
                    binding="netTcpBinding"
                    bindingConfiguration="LargeBufferTcp"
                    name="Scada.CommunicationManager.Contracts.ITraceContributorService"
                    contract="Scada.CommunicationManager.Contracts.ITraceContributorService" />-->
  6. Replace the localhost in both net.tcp endpoints un-commented above with the name of the machine running WEBfactory 2010 (WEBFACTORY-PC in our example):

    <!--<endpoint address="net.tcp://WEBFACTORY-PC:4600/Scada/CommunicationWebClientService"
                    binding="netTcpBinding"
                    bindingConfiguration="LargeBufferTcp"
                    name="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"
                    contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService" />-->
    <!--<endpoint address="net.tcp://WEBFACTORY-PC:4600/Scada/TraceContributorService"
                    binding="netTcpBinding"
                    bindingConfiguration="LargeBufferTcp"
                    name="Scada.CommunicationManager.Contracts.ITraceContributorService"
                    contract="Scada.CommunicationManager.Contracts.ITraceContributorService" />-->

    IMPORTANT

    If the web services port was modified when configuring the WEBfactory 2010 Server communication, use the new port when configuring the net.tcp endpoints.

  7. Next, open the Client.config file located at C:\inetpub\wwwroot\_SERVICES\WEBservices\WCF\ with a text editor.

    Capture4264.jpg
  8. Locate and comment out the net.pipe client endpoint for the CommunicationWebClientService:

    <endpoint name="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"
     		address="net.pipe://localhost/Scada/CommunicationWebClientService"
    		binding="netNamedPipeBinding"
     		bindingConfiguration="LargeBufferNamedPipe"
    		contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"/>
  9. Locate and un-comment the net.tcp client endpoint for the CommunicationWebClientService:

    <!--<endpoint name="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"
     		address="net.tcp://localhost:4600/Scada/CommunicationWebClientService"
    		binding="netTcpBinding" 
    		bindingConfiguration="LargeBufferTcp"
    		contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"/>-->
  10. Replace the localhost in the net.tcp endpoint un-commented above with the name of the machine running WEBfactory 2010 (WEBFACTORY-PC in our example):

    <!--<endpoint name="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"
     		address="net.tcp://WEBFACTORY-PC:4600/Scada/CommunicationWebClientService"
    		binding="netTcpBinding" 
    		bindingConfiguration="LargeBufferTcp"	
    	contract="Scada.CommunicationManager.Contracts.ICommunicationWebClientService"/>-->

    IMPORTANT

    If the web services port was modified when configuring the WEBfactory 2010 Server communication, use the new port when configuring the net.tcp endpoint.

Porting other WEBfactory 2010 settings

In order to obtain the same WEBfactory 2010 experience in the new triple-machine environment, we need to manually port some settings originally made by Service Packs on the WEBfactory 2010 machine to the Web Server machine.

Disabling the IIS logging for the _SERVICES applications:

Open a Command Prompt terminal using Administrator privileges.

  1. Apply the following command to unlock the configuration section that allows the disabling of IIS logging:

    %windir%\System32\inetsrv\appcmd unlock config /section:httpLogging
  2. Apply the following command to stop the IIS logging for the _SERVICES folder and its applications:

    %windir%\System32\inetsrv\appcmd set config "Default Web Site/_services" /section:httpLogging /dontLog:true
  3. Restart the IIS using the IIS Manager or using the following command:

    iisreset

Testing the triple-machine environment

To test the triple-machine setup, deploy a Silverlight application to IIS on the Web Server machine, as explained in the articles below:

The test application should run as expected.