Page Tree


Previous Releases

FactoryStudio 8.1

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
If IIS was previously installed on your system

Easy Heading Free
headingIndent40
navigationTitleOn this page
selectorh2,h3
wrapNavigationTexttrue
navigationExpandOptiondisable-expand-collapse

Overview

When installing Factory Studio, if IIS is located, you will not be able to install our embedded web server (

TWebServer

TWeb- Server.exe)

when you install FactoryStudio

.

 

The FactoryStudio software will run without the

webserver, however, you will not be able to remotely access project configurations or serve runtime web pages.  All other functionality works

web server, except by remotely accessing project configurations and serving runtime web pages; all other FactoryStudio engineering and runtime tools run without needing to install our TWebServer or to do any IIS configuration.

If you want

to use IIs

to enable remote engineering access and the web clients using IIS, you need to install some

FactoryStudio

FactoryS- tudio services in IIS. This Technical Note is the explanation of how to install those services in IIS

or enabled the TWebServer. IIS is also necessary

, currently we have the description for IIS 7.x., but other versions should be similar.

Another scenario where IIS is necessary is when you want to run the

runtime

RUNTIME as a Windows Service, and still be able to provide

remote access to project

web pages, iPad

displays,

clients and

project engineering.

To enable the TWebServer, stop the IIS server or other applications that use port 80, and run the product installation. To setup the IIS server, follow the procedure in this chapter.

This section explains how to install these services in IIS. This explanation targets IIS 7.x and 8, but other versions should be similar.

remote engineering.

You are going to install three services inside IIS

:TProjectServer —Allows

, one service is TProjectServer which allows you to remotely access your project configurations.

 TVisualizerWeb/TVisualizerRemote —Allows

Another service is TWebClient/TSmartClient which allows remote access to runtime displays.

 iDataPanel—Is the service that provides

Use the following step-by-step instructions to configure IIS. Finally the iDataPanel is the service to provide data to iOS devices

On this page:

Table of Contents
maxLevel2
stylecircle

Configuration Procedure

  • Verify that IIS is installed by going to Control Panel > Administrative Tools and looking for Internet Information Services (IIS) Manager in the list. 
  • Enable ASP.Net and 




    Installation Procedure

    This procedure was executed on Windows 7, x64, with IIS 7.5. With older versions of operating system and IIS, the procedure can be slightly different, like defining a “Virtual Directory” instead of “Add Application”.

    • Verify if IIS is installed and running, for instance, trying to open HTML
    • Enable Net and .Svc Handlers for the WCF Service.
    On

    For IIS 7.x:

    If IIS was installed after the installation of the .NET Framework , it is necessary to run and verify the a procedure as described on on http://msdn.microsoft.com/en-us/library/ms752252.aspx . This will which is to run the following programs using the command prompt as Administrator:

      • From the Microsoft .Net folder, open the Command Prompt and run the following commands:
              aspnet_regiis.exe -I -enable
              ServiceModelReg.exe -r
    Microsoft .Net is installed in one of the following folders:

    aspnet regiis –i –enable” (from the .NET Framework installation directory*)

    Image Added

    ServiceModelReg.exe” -r (from the .NET Framework installation directory*)

    Image Added

    Note

    The .NET Framework installation directory usually is: 

    C:\Windows\Microsoft.NET\Framework\v4.0.30319

    (for 32-bit operating systems)

    , or

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319 (for

    64-bit operating systems

    x64 Windows)


    For IIS 8.0

    :From the Control Panel, go

    Go to Program and Features,

    then click

    choose “Turn Windows features on or

    off”

    off“.

    Image Added

    Enable the ASP.NET 4.

    7 option. Navigate the tree: 

    5 option (Internet Information Services > World Wide Web Services > Application

    Development

    Devel- opment Features > ASP.NET 4.

    7

    5:

    Image Removed

    Image Added


    Enable the HTTP Activation option (

    under 

    under .Net Framework 4.

    7

    5 Advanced Services)

    .

    Image Added

    Image Removed

          3.   From the IIS Manager, verify that the .svc extension is mapped to aspnet_isapi.dll.

      • If needed, follow the procedure described on http://msdn.microsoft.com/en-us/library/ms752252.aspx for the version of IIS you are using. 
        • The .NET Framework installation directory usually is: C:\Windows\Microsoft.NET\Framework\v4.0.30319, or C:\Windows\Microsoft.NET\Framework64\v4.0.30319 (for x64 Windows)

    Image Removed

          4.   From the FactoryStudio


    Note

    For .NET Framework versions newer than 4.5, the ASP.NET will be different (the same as the Framework version). But the configuration remains the same.


    Verify if the extension ”.svc” is mapped to the folder is mapped to ”aspnet isapi.dll” (the msdn.microsoft site, on previous link, it is explained how to verify that for the many IIS versions)

    Image Added


    From within the Factory Studio installation folder, run the utility:

    Code Block
    InstallTWebServer.exe /uninstall
    ,

    which will remove the default TWebServer installation

    Image Removed

          5.   From the IIS Manager, go to Sites > Default Web Site > Add Application .

    Image Added

    Before configuring the applications for IIS, it is recommended a verification to validate if it is working. To do so, open ”Sites/Default Web Site/Edit Permission” and check if it is linked to wwwroot folder.

    Image Added

    If so, then in the Actions pane, under Browse Web Site, click the link associated with *:80(http).

    Image Added


    A default IIS image should open on your browser.

    Image Added


    After making sure the IIS is working, open ”Sites/Default Web Site/Add Application” and configure the information for the services as described in following steps

    Image Removed

          6.   For the TProjectServer, configure: 

  • Alias—TProjectServer 
  • Physical Path—C:\Program Files\Tatsoft\FactoryStudio (Default folder. Make sure you use the correct path to the FactoryStudio installation folder.) 
  • Application Pool—Configure any pool based on .NET 4.

    :

    Image Added


    TProjectServer:

    • Alias: TProjectServer.
    • Physical Path: C: Program Files Tatsoft FactoryStudio // -> VERIFY and correct to the Factory Studio installation
    • Application Pool: Configure any pool based to .NET 0. Example: ASP.NET v4.0.

    Image Added

    Image Removed
    Note
    Note:

    You should allow “Everyone” access, at least for reading.


    Note

    You must allow “<ComputerName> IIS IUSRS “ user can read and write on the directories of the projects. Example: For

    C:\FactoryStudio\Projects\<ComputerName>\IIS_IUSRS

    User must be included in the security permissions for reading

    From

    and writing (full control) on the “C: FactoryStudio ” directory and ensure that all subdirectories (Projects, Settings) inherit these permissions.


    On IE, use the

    URL

    url ”http://localhost/tprojectserver/service.svc” in order to verify if the service was correctly installed. That should show a page with information about the service.

     

          7.   For TVisualizerWeb/TVisualizerRemote, configure: 

  • Alias - fs-8.1 
  • Physical Path—C:\Program Files\Tatsoft\FactoryStudio\fs-8.1 (Default folder. Make sure you use the correct path to the FactoryStudio installation folder.) 
  • Application Pool—Configure any pool based on .NET 4.


    TWebClient/TSmartClient:

    • Alias: fs-2014.1.
    • Physical Path: C: Program Files Tatsoft FactoryStudio-2014.1 // → FactoryStudio installation folder.
    • Application Pool: Configure any pool based to .NET 0. Example: ASP.NET v4.0.

    Image Added

    Image Removed
    Note
    Note:

    Security should enable any user (Everyone), at least for reading.

    On IE, test

    the 

    the url “http://localhost/fs-

    8

    2014.1/service.svc

     URL

    ” in order to verify the service was correctly installed. It should show a page with information about the service.

     

          8.   For the iDataPanel Service, configure: 

  • Alias—iDataPanel
  • Physical Path—C:\Program Files\Tatsoft\FactoryStudio\fs-8.1 (Default folder. Make sure you use the correct path to the FactoryStudio installation folder.) 
  • Application Pool—Configure any pool based on .NET 4.

    Go to MIME Types and create the following MIME Type:

    Image Added


    iDataPanel Service

    • Alias: iDataPanel.
    • Physical Path: C: Program Files Tatsoft FactoryStudio fs-2014.1 // -> FactoryStudio folder
    • Application Pool: Configure any pool based to .NET 0. Example: ASP.NET v4.0
    • Note:
    • .

    Image Added

    Note

    Security should enable any user (Everyone), at least for reading

    .

    Image Removed

          9.   Forthe DataPanelImages


    iDataPanelImages (Virtual Directory), configure:

    Image Removed

    Image Added

    • Alias
    • iDataPanelImages 
    • : iDataPanelImages
    • Physical Path
    • : C:\FactoryStudio\Projects\
    • iDataPanelImages 

          10.   Enable Anonymous Authentication for each of the services. 

    Image Removed

         11.   Setup the Compression module. If it is not installed, you will see the alert boxes.

    Image RemovedImage Removed

    Image Removed

          12.   Create a new MIME Type for the .tzip extension

    Image Removed

          If the dynamic compression is
    • iDataPanelImages

    Image Added

    Note

    Security should enable any user (Everyone), at least for reading


    Anonymous Authentication” must be enabled for the services.

    Image Added


    Go to the Compression module.

    Image Added

    There’s check boxes, but it’s not installed you may see this yellow alert on the right side.

    Image Added

    If it’s not installed, go to the Server Manager, Roles, Web Server. Under Role Services, check your installed Roles. If Dynamic Compression isn't isn’t installed, click Add Roles and install it.
     

    Image Added

     
          You can go back to compression for your site and ensure Dynamic Compression is checked. At this point, Dynamic Compression should be setup, but you really need to be specific about what mimeTypes MimeTypes will be compressed.

     Image Removed
     
     
     

    com- pressed.

    Back in IIS Manager, go to the page for the SERVER, not the SITE. Click on Configuration Editor:

    Image Added

    From the dropdown, select system.webServer/

    webdev /

    httpCompression:

    Image Removed

    Image Added

         

    Then click on Dynamic Types and now that you’re in the list editor. Add application/json as seen below.

    Image Added

    Note

    IIS must be restarted after configuring the services.


    At this moment the IIS configuration for HTTP access is completed.

    If you want to configure a HTTPS connection as well, then follow the next steps.




    How to Set Up SSL on IIS 

    The steps for configuring Secure Sockets Layer (SSL) for a site are the same in IIS 7 and above and IIS 6.0, and include the following:

    [a)]Get an appropriate certificate. Create an HTTPS binding on a site. Test by making a request to the site. Optionally configure SSL options, that is, by making SSL a requirement.

    Obtain a Certificate

    For the server certificate, you have two options.

    [1)]The first is to acquire a paid certificate, that will ensure your web security. The second one is to generate a self-signed certificate, that will be used for testing purposes only. We do not recommend using a self-signed certificate in a final project deployment.

    If you choose to use the self-signed one, then follow the next steps.

    Select the server node in the treeview and double-click the Server Certificates feature in the listview:

    Image Added

    Click Create Self-Signed Certificate... in the Actions pane.

    Image Added

    Enter a friendly name for the new certificate and click OK.

    Now you have a self-signed certificate. The certificate is marked for ”Server Authentication” use, that is, it uses as a server-side certificate for HTTP SSL encryption and for authenticating the identity of the server.

    Create an SSL Binding

    Select a site in the tree view and click Bindings... in the Actions pane. This brings up the bindings editor that lets you create, edit, and delete bindings for your Web site. Click Add... to add your new SSL binding to the site.

    Image Added

    The default settings for a new binding are set to HTTP on port 80. Select https in the

    list editor, add application/json as shown below. Close the dialog after you add it. 

    Image Removed

          12.   If your remote users cannot access FactoryStudio, you should allow Everyone access to the FactoryStudio folder, at least for reading. Right-click the folder, click the Security tab, click Edit, then add read permissions for Everyone. WarningIIS must be restarted after configuring the services.

    Type dropdown list. Select the self-signed certificate you created in the previous section from the SSL Certificate drop-down list and then click OK.

    Image Added

    Now you have a new SSL binding on your site and all that remains is to verify that it works.

    Image Added


    Verify the SSL Binding

    In the Actions pane, under Browse Web Site, click the link associated with the binding you just created.

    Image Added

    Note

    Internet Explorer (IE) 7 and above will display an error page because the self-signed certificate was issued by your computer, not by a trusted Certificate Authority (CA). IE 7 and above will trust the certificate if you add it to the list of Trusted Root Certification Authorities in the certificates store it on the local computer, or in Group Policy for the domain.


    Click Continue to this website (not recommended).

    Image Added


    *IMPORTANT: The self-signed certificate should be used only for local development. Microsoft Internet Explorer do not trust self-signed certificates by default for security reasons. However, for testing propose, you need to follow steps below:

    1. Browse to your page (e.g. https://localhost:443) in Internet Explorer which should use your self- signed SSL certificate. You should be greeted by an error message saying your certificate is not trustworthy.
    2. Click “Continue to this website”.
    3. Click on “Certificate error” in the address bar, and then click “View certificates”.
    4. Click “Install Certificate”.
    5. Click “Place all certificates in the following store”, and then click “Browse”. Do not rely on the preselected option to automatically select the certificate store as this will not work!
    6. Inside the dialog box, click “Trusted Root Certification Authorities”, and then click “OK”.
    7. Finish the dialog.
    8. When you get a security warning, click “Yes” to trust the certtificate.
    9. Reload your The certificate should be working fine now. If the error persist, replace ”localhost” in the url with the UserName the certificate was Issued To. E.g.: https://WMSvc-ALEXISE3LH:443.

    Image Added


    Configure SSL Settings

    Configure SSL settings if you want your site to require SSL, or to interact in a specific way with client certificates. Click the site node in the tree view to go back to the site’s home page. Double-click the SSL Settings feature in the middle pane.

    Image Added


    Enable Web Client to use SSL Settings

     SmartClients Only

    • Open “Web.config” file in Windows The files are located in:

      C:\ProgramFiles (x86)\Tatsoft\FactoryStudio
      C:\ProgramFiles (x86)\Tatsoft\FactoryStudio\fs-2014.1\

    • You will find some comments regarding what command lines are used for HTTP or So, you will need to comment out the HTTP lines, and uncomment the HTTPS ones.


    Code Block
    titleExample
    <!-- If using HTTP then Security Mode is None by default -->
    <security mode="None" />
    <!-- If using HTTP then Security Mode can use Windows Authentication -->
    <!--
    <security mode="Transport">
    <transport clientCredentialType="Windows"/>
    </security>
    -->
    <!-- If using HTTPS then Security Mode is Transport -->
    <!--
    <security mode="Transport">
    <transport clientCredentialType="None"/>
    </security>
    -->

    Replace with:

    Code Block
    <!-- If using HTTP then Security Mode is None by default
    <security mode="None" />
    -->
    <!-- If using HTTP then Security Mode can use Windows Authentication -->
    <!--
    <security mode="Transport">
    <transport clientCredentialType="Windows"/>
    </security>
    -->
    <!-- If using HTTPS then Security Mode is Transport -->
    
    <security mode="Transport">
    <transport clientCredentialType="None"/>
    </security>


    Repeat this procedure throughout the xml file.

    Note

    http://www.iis.net/learn/manage/configuring-security/how-to-set-up-ssl-on-iis


    WebClients (HTML5) Only

    If using https to access a WebClient (HTML5), you must inform the application the correct port number to be used in this connection.

    To do so, create a shortcut of the TStartup.exe application, or launch the command prompt from the installation folder (fs-xx.x). Add the project and html5port parameters as indicated in the image.

    Image Added





    Common Errors

     Internet Explorer Security Settings

    Image Added


    If you get an error message as the image above, it might be related to your Browser security settings. Microsoft automatic updates of Internet Explorer may change some defaults on .NET support. That may cause you browser to have disabled XAML browser based applications.

    In order to verify that open the ”Internet Options” of Internet Explorer, and navigate as described at the image below.

    Make sure that on .NET Framework section, the XAML browser based applications is set to Enable.

    Image Added


    Missing File

    If you the error message you get is something like the following:

    Image Added

    Then, the problem might be related to some files being missing from the installation folder. To check that, go to your products Installation folder and search for that file.

    If you don’t find it, you should uninstall the product, and install it again.


    Binaries Modified

    If you the error message you get is something like the following:

    Image Added

    Then, the problem might be related to some files from the product’s installation folder are differing from the default ones. So, you have two options going forward:

    • Find out what files were modified, and restore them to their original configurations.
    • Uninstall the product, and install it again.

    Firewall blocking

    It is quite common to have firewall preventing the remote access of the application. So, before accessing remotely, try to open a local copy of the browser locally at the server.

    That means run the server and the client at the same computer, before trying the remote access.

    Code Block
    http://localhost/fs-2014.2/TWebClient.Xbap or http://127.0.0.1/fs-2014.2/TWebClient.Xbap

    or with another Port number, example, for instance 1234

    Code Block
    http://localhost/fs-2014.2:1234/TWebClient.Xbap or http://127.0.0.1:1234/fs-2014.2/TWebClient


    Insufficient User Permissions

    If you are unable to launch the client and the error message is different from the ones above, the current user logged in the system might not have the necessary permissions to access the files through an HTTP or HTTPS connection.

    To overcome that, launch the Command Prompt as an Administrator and execute the following commands:

    Code Block
    For port used in HTTP (in this example 80)
    
    netsh http add urlacl url=http://+:80/thtml5/+ sddl=D:(A;;GX;;;IU) For port used in HTTPS (in this example 4430)
    netsh http add urlacl url=https://+:4430/thtml5/+ sddl=D:(A;;GX;;;IU)