Website and Web Application Management on a Remote Web Server (IIS)

Scenario:

On the Desigo CC Server, you have created a Server project using SMC and the project is started. The CCom manager for the project that you want to connect to must be running on the server.

Now, you want to connect a website/web application available on a third-party machine (target machine) to the project on the Desigo CC Server system.

To do this, you must have an intermediate machine (for example, a laptop). On this laptop, before exporting the web application to the third-party system, you perform certain steps.

 

Workflow diagram:

 

 

Prerequisites:

 

Steps:

1 – Download and Install Microsoft Web Deploy 3.6

To deploy the web application and website on IIS servers, you must install Microsoft Web Deploy 3.6 on both, the source machine (Desigo CC machine), as well as the target machine (third-party machine).

NOTE:
If you do not have Microsoft Web Deploy 3.6 installed on the source and target machines, you cannot export or import Web Applications. However if the export or import web applications still do not become available, see Enable the Import/Export Web Application
You must only download the Web Deploy x64 version and in the Setup type field, select Complete.

You can download Microsoft Web Deploy 3.6 from http://www.iis.net/downloads/microsoft/web-deploy.

For installing Web Deploy x64, please refer to How to perform a complete install at http://technet.microsoft.com/en-us/library/dd569059(v=ws.10).aspx.

 

Enable the Import/Export Web Application

To enable the Import/export Web application option in IIS for working with remote web application, you must first enable Management Service feature in IIS. Perform the following procedure to install the Management Service feature in IIS on different OS types.

Windows 11

  1. From Control Panel > Programs > Programs and Features, click Turn Windows feature on or off.
  1. Expand Internet Information Services and then Web Management Tools and select the feature IIS Management Service.
  1. Click OK.
  1. Verify that the Import/export Web application option is enabled in IIS.
  1. Restart the computer, if required.

Windows Server 2022

  1. Open the Windows Server Manager.
  1. On the Manage menu, click Add Roles and Features Wizard.
  • The Add Roles and Features Wizard window displays.
  1. In the Server Selection > Server Roles, expand Web Server (IIS) and select Management Service under Management Tools.
  1. Click Next.
  1. Click Next.
  1. Click Install.
  1. The feature Management Service is installed.
  1. Verify that the Import/export Web application option is enabled in IIS.

 

2 – Assign the Domain User as a Member of the IIS_IUSRS Group
  • You are on the third-party machine.
  • A domain user is already created and you want to assign the domain user as a member of the IIS_IUSRS group.
  • The user is the same user to which the project is shared.
  1. From Windows Start menu, select Computer.
  1. Right-click Computer and select Manage.
  1. In the Computer Management tree, select System Tools > Local Users and Groups > Groups.
  1. Right-click IIS_IUSRS group, and click Add to Group.
  • The IIS_IURS Properties window displays.
  1. Click Add.
  • The Select Users, Computers, Service Accounts, or Groups window displays.
  1. Provide the domain user's name in the Enter the object names to select … field.
  1. Click OK.
  • The domain user is added as a member of the IIS_IURS group.
  1. In the IIS_IURS Properties window, click Apply and OK.

For more information, see http://technet.microsoft.com/en-in/library/cc739265(v=ws.10).aspx

 

3 – Create a New Website or Edit an Existing Website in IIS

If a website is not available on the third-party machine, you must create one. If a website already exists, you must edit it.

  • You are on the third-party machine.
  1. If there is already an existing website, skip steps 2 to 6.
    To create a new website, proceed with step 2.
  1. Click Start and type IIS in the Search programs and files field.
  1. Click IIS Manager to open the Internet Information Services (IIS) Manager.
  1. Right-click the Sites node and select Add Web Site.
  1. In the Add Web Site dialog box that displays, add the following parameters:
  • Site name
  • Physical path
  • Hostname
  • Http port
  1. Click OK.
  • A website is created.
  1. In the Sites tree, select the website.
  1. From the Actions pane, click Bindings.
  1. In the Site Bindings dialog box, click Add.
  1. In the Edit Site Binding dialog box, do the following:
    a. Select https from the Type drop-down list.
    b. Enter the Port number.
    c. From the SSL certificate drop-down list, select a SSL certificate.
  1. Click OK.
  1. Click Close.
  • Binding is successful and the website is configured.
  1. Select Sites > [Website node] for which you want to enable the WebDAV Authoring Rules and double-click WebDAV Authoring Rules.
  1. In the Actions pane, click WebDav Settings.
  1. Set the following two properties as True and click Apply.
  • Allow Anonymous Property Queries
  • Allow Property Queries with Infinite Depth
  • The changes are saved successfully.

 

4 - Create and Configure a Web Application for Export
  • You are on the source machine.
  1. Create a website using the SMC on the source machine. Provide the host name as the host name of the target machine where you want to export the web application to be created under this website.
  1. Create a Web Application under the website using the SMC.
  • The web application is created under the website whose host name is the same as the host name of the target machine.
  1. If one of the following messages displays during website creation, ignore them and click OK.
Website Creation Message
Website Creation Chain Validity

 

5 – Export a Web Application from the Source Machine
  • You are on the source machine.
  • A web application is created using the SMC under a parent website with the host name of the Target machine where you want to export the web application.
  1. Click Start.
  1. In the Search programs and files field, type IIS.
  1. Click Internet Information Services (IIS) Manager to open.
  1. Select Sites > [web application] that you want to export and click Export Application from the Actions pane.
    NOTE: The Export Application menu displays only if you have installed Web Deploy.
  • The Export Application Package window displays.
  1. Click Next and Next again.
  1. Specify the file name and path to export and click Next.
  1. The Export Progress and Summary window displays. Wait for the export process to complete. This takes approximately one minute.
  • The Export Progress and Summary window displays that the web application export was successful.
  1. Click Finish to exit.

NOTE:
Ensure that you keep backup copies of the IIS exported Web Application that you are about to import.

 

6 – Import a Web Application on the Target Machine
  • You have the zip file of the exported web application that you want to import on the third-party (target) machine.
  • You are on the target machine.
  1. Copy the zip file of the exported web application that you want to import at a desired location on the target machine.
  1. Open the Internet Information Services (IIS) Manager.
  1. Select Sites > [website] and click Import Application from the Actions pane.
    NOTE: The Export Application menu displays only if you have installed Microsoft Web Deploy 3.6.
  • The Import Application Package window displays.
  1. Browse for the exported web application zip file on the target machine and click Next.
  1. (Optional) Specify the web application name.
  1. Click Next.
  • A message displays asking you to change the application to run in .Net 4.0 application pool.
  1. Click Yes.
  1. Click Finish.
  • The web application is added as a child under the website in IIS.

 

7 – Create Virtual Directories for a Web Application in IIS

To save objects, such as graphics and journaling objects, you must create virtual directories for the web application that you created. You must create the following virtual directories under [Installation Drive]:\[Installation Folder]\GMSMainProject\_tmpGMSWebSite in IIS on the target machine under the …\Systems\[System Name] folder of the web application.

  • devices
  • documents
  • graphics
  • libraries
  • profiles
  • EM virtual directory, if the EM is installed, for example Scripting
  • shared

Additionally you must also create the Help virtual directory under the web application in IIS. You must also copy the Help folder from the …\MainProject (from source) to the web application folder on the target machine.

The following procedure explains how to create all the virtual directories for the newly created web application:

  • You are on the target machine and you have successfully imported the web application in IIS.
  1. Open the Internet Information Services (IIS) Manager.
  1. Select the web application that you have imported and right-click, and select Add Virtual Directory.
  1. In the Add Virtual Directory dialog box, enter information into the following fields:
    a. Alias as Systems for creating the Systems virtual directory.
    b. Physical Path as the local path of the Distribution folder of the web application on the target machine for example …\[Web application name]\Distribution.
  1. Click Connect as.
  1. In the Connect As window, select Specific User and click Set.
  1. In the Set Credentials window, do the following:
    a. Enter a user name (domain user credential with which you have shared the project, virtual directories and the user should be a member of the IIS_IUSRS group).
    b. Enter a password and confirm it.
  1. Click OK.
  1. Click OK in the Connect As dialog box.
  1. In the Add Virtual Directory dialog box, click Test Settings to open the Test Connection dialog box.
  1. Ensure that both results—Authentication and Authorization—are successful and the message The specified user credentials are valid displays in the Details section.
  1. Click Close.
  1. Click OK.
  • The devices virtual directory is added under the Web Application node in IIS.
  1. Repeat steps 3 to 12 to add the virtual directory [System Name], for example System1 under the Systems virtual directory.
  1. Repeat steps 3 through 12 to create the virtual directories: documents, graphics, libraries, profiles, and shared under the [System Name] virtual directory. Provide the Alias as the exact name of the virtual directory and Physical Path as the shared path of the source machine where the virtual directories are present, for example,
    \\[Machine Name]\[Project Name]\devices.
  • The documents, graphics, libraries, profiles, and shared virtual directories are created under the Systems\[System Name] node in IIS on the target machine.

NOTE:
To work with projects in distribution, that is, if the project to which the web application is linked is in distribution with other projects, then you must add the system names of the projects in distribution under the Systems virtual directory (on target machine). Furthermore, under each of the system names you need to add the same virtual directories present under the path [Installation Drive]:\[Installation Folder]\GMSMainProject\_tmpGMSWebSite. The path for these should be the shared path of these individual project directories on the source machine with the shared user.

 

Create a ClickOnce Virtual Directory

  • You are on the target machine.
  • You have successfully imported the web application in IIS, created the devices, documents, graphics, libraries, profiles and shared virtual directories.
  1. To create a ClickOnce virtual directory, you must first obtain the brand name of the product. To do this, proceed as follows:
    a. Open the SMC, and from the Header bar, select Menu > About.
    b. From the About dialog box that displays, verify the Product name. For example, Desigo CC .This is the brand name.
  1. Open the Internet Information Services (IIS) Manager.
  1. Select the Web Application that you have imported and right-click, and select Add Virtual Directory.
  • The Add Virtual Directory dialog box displays.
  1. In the dialog box, do the following:
    a. Provide the Alias as [Company Name. + Brand Name + .ClickOnce]
    NOTE: Remove any space characters in the brand name.
    b. Provide the Physical Path by navigating to the ClickOnce folder of the imported web application on the third-party machine. Provide the physical path as the path of ClickOnce sub-directory under web application directory on the target machine.
  1. Repeat steps 5 through 12 from Creating Virtual Directories for Web Application in IIS on Target Machine.
  • The ClickOnce virtual directory is added under the web application node in IIS.

 

 

8 – Enable the WebDAV Authoring Rules for a Website
  • You are on the target machine and the Internet Information Services (IIS) Manager is open.
  1. Select Sites > [website] for which you want to enable the WebDAV Authoring Rules and double-click WebDAV Authoring Rules.
  1. Click Enable Web DAV from the Actions pane.
  1. Set the Web DAV Settings from the Actions pane and set the Properties behavior to True.

 

9 – Set the WebDAV Authoring Rules for Virtual Directories
  • You are on the target machine and the Internet Information Services (IIS) Manager is open.
  1. Select Sites > [website] > [web application] > [Virtual Directory] for which you want to enable the WebDAV Authoring Rules and double-click WebDAV Authoring Rules.
  1. In the Actions pane, click Add Authoring Rule.
  • The Add Authoring Rules dialog box displays.
  1. In the Add Authoring Rule dialog box, do the following:
  • In the Allow access to section, select the All Content.
  • In the Allow access to this content to section, select All users.
  • To set the permissions in the Permissions section do the following:
    a. Go to the path [Installation Drive]:\[Installation Folder]\GMSMainProject\_tmpGMSWebSite\[virtual directory] on the source machine.
    b. Open the config file.
    c. Check the access rights in this file.
    d. In the Permissions section of the Authoring Rules dialog box, select the exact permissions, Read, Source, and Write.
    For example, for the devices virtual directory you must open the config file located at path
    [Installation Drive]:\[Installation Folder]\GMSMainProject\_tmpGMSWebSite\devices and the access entry is access = rw”, where r = read, and w = write permissions. In the Permissions section of the Add authoring Rule dialog box, you must select the Read and Write check boxes.
  1. Click OK.
  • The WebDAV Authoring Rule entry is added successfully.
  1. Repeat steps 3a to 3d for each virtual directory. For the ClickOnce virtual directory, in step 3d, set the Permission as Read.
  1. The WebDAV Authoring Rule entries are added successfully for all the virtual directories, including ClickOnce.

 

10 – Verify/Create the Application Pool of a Web Application

The web application pool version of the source and target machine must match, if it does not match, then you must create a new one that matches the settings on the source machine. The following procedure describes how to verify this, and create a new web application pool, if required.

  • You are on the third-party machine.
  • A website is available on the third-party machine.
  1. Click Start and type IIS in the Search programs and files field.
  1. Click IIS Manager to open the Internet Information Services (IIS) Manager.
  1. To verify the Application Pool .Net Framework Version, go to the Connections pane on the source machine and select the web application that you want to export, and from the Actions pane select Basic Settings.
  • The Edit Application window displays.
  1. Click Select.
  1. In the Select Application window, under the Properties field, check the .Net Framework Version and Managed Pipeline Mode.
  1. On the target machine, open the IIS Manager and from the Connections pane, select Application Pools.
  1. Ensure that the version of the web application Pool (check for .Net Framework Version and Managed Pipeline Mode) is the same as available.
  1. To create a Web Application Pool with the .NET framework version and Managed Pipeline Mode settings the same as the source machine, proceed as follows:
    a. From the Connections pane, select Application Pool.
    b. From the Actions pane, click Add Application Pool.
  1. In the Add Application Pool window that displays, do the following:
    a. Provide the Application Pool Name.
    b. Select the .NET framework version to be the same as source machine.
    c. Select the Managed Pipeline Mode as Integrated.
    d. Click OK.
  • After successful creation, the entry is added in the Application Pool.

 

11 – Edit a Web Application
  • You are on the third-party machine.
  • IIS is opened and you have selected the imported web application in IIS.
  1. In the Actions pane, click Basic Settings.
  1. In the Edit Application dialog box, click Select.
  1. In the Select Application dialog box, ensure that the version of Application Pool: .Net Framework Version and Managed Pipeline Mode is the same as the application pool version on the source machine.
  1. Click OK.
  1. In the Edit Application dialog box, click Connect as.
  1. In the Connect As window, select the Specific User option and click Set.
  1. In the Set Credentials window, enter a user name (domain user credentials with which you have shared the project and virtual directories) and a password and confirm it.
  1. Click OK.
  1. Click OK.
  1. In the Edit Application dialog box, click Test Settings.
  1. In the Test Connection dialog box, ensure that both results—Authentication and Authorization—are successful and the message The specified user credentials are valid displays in the Details section.
  1. Click Close.
  1. Click OK.

 

12 – Remove a Web Application from IIS on the Source Machine
  • You are on the source machine.
  • A web application is created and available in IIS.
  • IIS is open.
  1. Expand the Web Server node, and the Sites folder.
  1. Right-click the web application you want to delete, and select Deploy > Delete Application and Content.
  1. Click Yes.
  1. Close the Internet Information Services (IIS) Manager window.