To make the web server use a virtual directory as a web application, it is necessary to define web application properties for this virtual directory. The application node serves for this purpose. This node is presented by type VDirAppType (virtdir.xsd). It has the following graphics model:

image 34279

  • The enabled node is required. If set to true, it enables the virtual directory to function as a web application. Data type: Boolean.

  • The parent-paths node is optional. If set to true, active scripts of the virtual directory are allowed to access its parent directories by relative paths (using the .. syntax). Data type: Boolean. Default value: false.

    If this feature is enabled, it is recommended that the execute_perm node holds none.

  • The run-in-mta node is required. Enables or disables the web application (located in the virtual directory) to run in the multithreaded apartment (MTA). Data type: Boolean. Default value: false.

  • The aspnet-version is optional. Specifies the ASP.NET version for web applications located in the virtual directory. Data type: string. Allowed values: 1.1 | 2.0 | 4.0.

  • The disabled node is required. If set to true, it disables the virtual directory to function as a web application. Data type: Boolean.

The following sample packet creates a virtual directory and defines it as a web application:

<packet>
<virtdir>
<create>
   <site-id>1</site-id>
   <name>/my_vdir</name>
   <properties>
      <application>
          <enabled/>
          <parent-paths>true</parent-paths>
          <run-in-mta>true</run-in-mta>
          <aspnet-version>1.1</aspnet-version>
      </application>
      <execute-perm>none</execute-perm>
      <require-ssl>true</require-ssl>
   </properties>
</create>
</virtdir>
</packet>

The following packet creates a virtual directory and sets the disabled web application mode for it:

<packet>
<virtdir>
<create>
   <site-id>1</site-id>
   <name>/my_vdir</name>
   <properties>
      <require-ssl>true</require-ssl>
      <application>
          <disabled/>
      </application>
   </properties>
</create>
</virtdir>
</packet>