Running WEBfactory 2010 on three separate machines
Leran how to run WEBfactory 2010 on three separate machines by following up the steps in this article.
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.
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:
One physical or virtual machine running WEBfactory 2010 version 3.6 Service Pack 1 (or higher) with Internet Information Services (IIS). See the Requirements and Recommendations article.
One physical or virtual machine running Microsoft SQL Server 2014. See the Hardware and Software Requirements for Installing SQL Server 2014 article.
One physical or virtual machine running Internet Information Services (IIS) version 6.1 or above
Network communication between all the above machines
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.
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 2010 Server and the database:
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.
Also make sure that the communication is allowed by the Windows Firewall (or any other firewall) for the 1433 port.
On the WEBfactory 2010 machine, start WEBfactory 2010Studio.
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.
Select SQL Server Authentication from the Authentication drop-down.
Provide the SQL User ID and Password.
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.
Click Login to connect WEBfactory 2010Studio to the remote database.
WEBfactory 2010Studio will display the Default database connection dialog which asks if the current database should be the default database used by WEBfactory 2010 Server. Click Yes to confirm.
The database can be also set as default Server database using the DNS Builder dialog from the Database Access settings of WEBfactory 2010 Studio.
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.
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.
Setting up the WEBfactory 2010 Server communication
The WEBfactory 2010 Server communication must be adjusted to work over TCP.
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.
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
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.
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).
Start the WEBfactory 2010 Server using the WEBfactory 2010Service Manager.
Deploying the web services
Next, the WEBfactory 2010 web services must be deployed on the Web Server machine.
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).
The WEBfactory 2010 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.
Right-click in the Application Pools page and select Add Application Pool... (or use the Actions panel to select the same option).
In the Add Application Pool dialog, name the new application pool WEBfactory_AppPool and click OK to confirm.
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
Click OK to confirm the application pool settings.
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.
In the Edit Site dialog, click on the Select... button from the Application pool area to select the new application pool.
In the Select Application Pool dialog, select the WEBfactory_AppPool and confirm the two opened dialogs by clicking the OK buttons.
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.
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.
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.
On the Web Server machine, open the Web.config file located at C:\inetpub\wwwroot\_SERVICES\WEBservices\ using a text editor.
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" />
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" />
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" />-->
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" />-->
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.
Next, open the Client.config file located at C:\inetpub\wwwroot\_SERVICES\WEBservices\WCF\ with a text editor.
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"/>
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"/>-->
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.
Apply the following command to unlock the configuration section that allows the disabling of IIS logging:
%windir%\System32\inetsrv\appcmd unlock config /section:httpLogging
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
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.