# IRPCWebAccessAdmin.CreateVirtualDirectory

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Web access administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebAccessAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebAccessAdmin/CreateVirtualDirectory/

Badges: `Administration API / specialized` `internal: not for applications` `admin` `session`

Creates an IIS virtual directory for M-Files Web under an existing web site.

- **Service:** [Web access administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebAccessAdmin/index.md) `MFiles.IRPCWebAccessAdmin`
- **gRPC method:** `/MFiles.IRPCWebAccessAdmin/CreateVirtualDirectory`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/create-virtual-directory`
- **Request:** [`CreateVirtualDirectoryRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebAccessAdmin/CreateVirtualDirectory/index.md#request)
- **Response:** [`CreateVirtualDirectoryResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebAccessAdmin/CreateVirtualDirectory/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

**For M-Files components only.** Used by M-Files Admin. Applications should not call it.
- Changes the IIS configuration of the server computer. Requires Windows Server; other Windows
  editions fail.
- Requires the system administrator server role (server right `edit_web_access_settings`).

<a id="request"></a>

## Request: CreateVirtualDirectoryRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `ads_path_parent` | `string` | The ADSI path of the parent node, for example `IIS://localhost/w3svc/2/ROOT` for the root of the web site whose ID is 2. |
| `name` | `string` | The name of the virtual directory. |
| `enable_new_web` | `bool` | True to set it up for the new M-Files Web. |

<a id="response"></a>

## Response: CreateVirtualDirectoryResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `virtual_dir` | [`ADSIObject`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ADSIObject/index.md) | The created virtual directory. |
| `virtual_dir.name` | `string` | The name of the object. |
| `virtual_dir.display_name` | `string` | The display name of the object. |
| `virtual_dir.schema_class` | `string` | The name of the object's schema class. |
| `virtual_dir.guid` | `string` | The GUID of the object as stored in the underlying directory store. |
| `virtual_dir.path` | `string` | The object's ADsPath that uniquely identifies this object from all others. |
| `virtual_dir.parent_path` | `string` | The ADsPath string for the parent of the object. |
