All Products
Search
Document Center

Cloud Storage Gateway:Build an IIS website with Cloud Storage Gateway

Last Updated:Jun 21, 2026

This topic shows you how to build a web server based on Internet Information Services (IIS) in Windows Server using Alibaba Cloud Storage Gateway (CSG).

Background information

Alibaba Cloud Storage Gateway (CSG) is a gateway that provides NAS and Samba sharing for Object Storage Service (OSS). A file gateway provides file-based access to your data in OSS. This lets users without object storage experience use the massive storage capacity of Alibaba Cloud OSS. Internet Information Services (IIS) is a web server provided by Microsoft and is a preferred choice for many Windows Server users. Compared with other open-source servers, IIS is faster and easier to deploy in Windows Server.

Prerequisites

  1. You have registered an Alibaba Cloud account and completed identity verification.

    Note

    We recommend using a Resource Access Management (RAM) account to perform operations on the Cloud Storage Gateway console.

  2. The Cloud Storage Gateway service is activated. When you log on to the Cloud Storage Gateway console for the first time, follow the on-screen instructions to activate the service.

  3. A VPC is available in the region where you want to create the file gateway.

  4. An ECS instance is available to serve as a client and is associated with the created VPC.

    Note

    You can also use an on-premises host if it is connected to the VPC through a dedicated connection.

  5. An OSS Bucket is created.

    Important
    • A file gateway supports only OSS Buckets of the Standard, Infrequent Access (IA), and Archive storage classes. OSS Buckets with the back-to-source feature enabled are not supported.

    • Avoid connecting a gateway directly to an Archive OSS Bucket. If files will not be modified for a long time after being written, consider using a Standard or IA bucket. You can then use lifecycle rules to transition the storage class of the objects to Archive or Cold Archive. This approach is more cost-effective and efficient because it avoids unnecessary restore operations.

    • When a client writes a file to the gateway, the gateway records at least two actions: writing the file and setting the file's modification time. The gateway attempts to merge these actions, but may still initiate multiple operations on the OSS Bucket for a single file. Setting the modification time translates to modifying the object's metadata in the OSS Bucket by using the CopyObject API. For Archive or Cold Archive objects, this requires a time-consuming restore operation, which can slow down uploads and even cause write failures if the cache disk does not have enough space to upload the data in time.

Configure Cloud Storage Gateway

  1. Go to the Gateways page of the Cloud Storage Gateway console and create an SMB-shared file gateway. For more information, see Manage a file gateway on the CSG console.

    Note

    When you configure the protocol, select SMB.

  2. On the Gateways page, find and click the target file gateway, and then click to add an SMB user.

  3. On the Add SMB User page, enter a Username and Password.

  4. On the Shares tab, click Settings to the right of the share to go to the SMB Share Settings page.

  5. On the SMB Share Settings page, click Edit to grant the new SMB user read and write permissions. On the SMB Share Settings page, you can configure parameters such as Share Name, Browsable, Read-Write Users, Read-Only Users, Write Speed Limit, and Upload Speed Limit. Click Edit next to Read-Write Users, add the target user (for example, xiaoli) as a read-write user, and then click OK.

Set up the IIS service

Important

For steps not mentioned in this topic, accept the default settings and click Next.

  1. In the Windows Control Panel, click Turn Windows features on or off. Alternatively, in Windows Server, open Server Manager and start the Add Roles and Features Wizard. This topic uses Windows Server 2022 as an example.

  2. Click Add roles and features.

  3. Select an installation type. On the Select installation type page, select Role-based or feature-based installation and click Next.

  4. Select a server to install roles and features. On the Server Selection page, select Select a server from the server pool, and then select the target server from the server pool.

  5. Select Web Server (IIS) and complete the installation. On the Server Roles page, select the Web Server (IIS) checkbox, click Next to complete the subsequent configuration steps, and then start the installation.

  6. After the installation is complete, click Close.

  7. In your applications, find and open Internet Information Services (IIS) Manager. Then, right-click Sites and select Add Website.

  8. In the Add Website dialog box, enter the site name and physical path. For Physical path (P), enter the SMB share mount target provided by Cloud Storage Gateway. Click OK.

Mount and access SMB share

  1. The IIS service requires a local Windows user to access the CSG mount target. In Windows Settings, navigate to Accounts > Other users, and then click Add someone else to this PC to create a local account (for example, xiaoli). After the account is created, it appears in the Other users list as a "Local account".

  2. In Internet Information Services (IIS) Manager, select the target website, and then click Advanced Settings on the right. For example, select the oss-demo site and click Advanced Settings in the Actions pane to open the dialog box.

  3. In the Advanced Settings dialog box, click the 。 icon next to Physical path credentials. Select Specific user and set the username and password to match the CSG SMB user. For a domain user, you can join the gateway to Active Directory to avoid creating an extra user. Click OK to complete the setup.

  4. Open File Explorer, right-click This PC, and then click Map network drive.

  5. In the Map Network Drive dialog box, enter the SMB mount target and select the Connect using different credentials checkbox.

  6. Click Finish. In the dialog box that appears, enter the SMB username and password to mount the drive. If you cannot map the network drive, open Command Prompt and run the following command.

    REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanWorkstation\Parameters /f /v AllowInsecureGuestAuth /t REG_DWORD /d 1

Access IIS service

  1. In the mapped network drive for the Cloud Storage Gateway, create a test HTML file named hello.html with the following content.

    <!DOCTYPE html>
    <html>
      <head>
        <title>This is a title</title>
      </head>
      <body>
        <p>Hello world!</p>
      </body>
    </html>
  2. After the IIS website starts, enter 127.0.0.1/hello.html in your browser's address bar. The page loads as expected, confirming the IIS website is accessible.