Issue index
Resolve the "500 - Internal Server Error"
Causes
Suppressed error details: By default, IIS displays a generic "500 Internal Server Error" page to remote clients to avoid exposing sensitive server information, such as code paths or database connection strings.
Configuration or code defects: The root cause is typically a syntax error in the
web.configfile or an exception in the application code.
Solution
Enable Detailed Errors in IIS to display the specific error cause and line number in the browser. This helps you pinpoint the problem.
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Enable detailed errors.
In the navigation pane on the left of the Internet Information Services (IIS) Manager page, click the target website.

In the IIS section, double-click Error Pages.

In the Actions pane, click Edit Feature Settings..., select Detailed errors, then click OK.
Access the website to view the detailed error message.
Press
Ctrl+F5to force a refresh. The browser now displays a detailed error message that points to the exact configuration file (such asweb.config) and line number causing the issue. Use this information to correct the corresponding configuration file or application code.
Prevent direct access to a website by IP address
Preventing direct access to your website by its IP address can mitigate security risks from unregistered or malicious domains that resolve to your server's public IP.
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Bind a domain name.
In the Internet Information Services (IIS) Manager navigation pane, select the target website and click Bindings... in the Actions pane. In the Site Bindings window, find the record with an empty Host name and double-click it. In the Edit Site Binding window, enter your domain name and click OK.
Verify the configuration by accessing the website with your domain name. You should not be able to access it using the server's public IP address.
Resolve website access issues caused by a port conflict
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open Command Prompt as an administrator.
Click Start, type
cmd, right-click Command Prompt, and select Run as administrator.Check if the service port is in use.
Get-NetTCPConnection -LocalPort <Port>The output includes the port status
Stateand the owning processOwningProcess.LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting OwningProcess ------------ --------- ------------- ---------- ----- -------------- ------------- :: 80 :: 0 Listen 4The example above indicates that port
80is being used by the process with anIDof4.Find the specific application by its PID.
Replace
<PID>with the process ID shown in theOwningProcesscolumn from the previous step.Get-Process -Id <PID>Resolve the port conflict.
Stop the process that is using the port.
If the program using the port can be safely closed, terminate it using the
taskkillcommand:taskkill <PID>Change the application's port.
To minimize port conflicts, use a port in the registered range (8000–49151).
Click Start, select Server Manager. In Server Manager, select .
In the navigation pane on the left of the Internet Information Services (IIS) Manager page, click the target website, then click Bindings... in the Actions pane.
In the Site Bindings window, select an existing binding record, click Edit..., modify the port, and then click OK.
Restart IIS.
iisreset /noforceVerify that the website is accessible.
Resolve the "403.14 - Forbidden" error
Causes
Missing default document: The website's root directory or the accessed subdirectory does not have a default entry file (such as
index.htmlordefault.aspx) configured.Directory browsing disabled: For security, IIS prohibits listing directory contents by default. This setting triggers a 403.14 error when a default document cannot be found.
Solutions
Solution 1: Configure a default document (Recommended)
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Configure the default document.
In Internet Information Services (IIS) Manager, click the target website. In the IIS section, double-click Default Document, then click Enable in the Actions pane.
In the default document list, add the website's entry file name, such as
index.htmlordefault.htm. Ensure this file exists in the website's root directory.
Verify that the website is accessible.
Solution 2: Enable directory browsing
Enabling directory browsing exposes your site's file and directory structure, which poses a security risk.
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Enable directory browsing.
In the navigation pane on the left of the Internet Information Services (IIS) Manager page, click the target website.
In the IIS section, double-click Directory Browsing. In the Actions pane, click Enable.
Verify that the website is accessible.
Resolve the "0x80070002 The system cannot find the file specified" error
Cause
IIS relies on Handler Mappings to determine how to process requests for specific file types, such as .aspx files. This error occurs when the .NET Framework is installed in the wrong order or its registration information in IIS is corrupted or missing. As a result, IIS cannot find the correct component to handle ASP.NET requests, leading to the "cannot find the file specified" error.
Solution
To resolve this, re-register the correct .NET Framework version in IIS using the aspnet_regiis.exe tool. This action repairs the corrupted Handler Mappings.
Click Start, type
cmd, right-click Command Prompt, and select Run as administrator.Navigate to the
Frameworkdirectory.The
aspnet_regiis.exetool resides in the .NET Framework installation directory.It is typically located in the
C:\Windows\Microsoft.NET\Framework64directory. For example, for .NET Framework 4.x:cd /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319Uninstall ASP.NET.
aspnet_regiis.exe -uInstall and register ASP.NET with IIS.
aspnet_regiis.exe -iRestart IIS.
iisreset /noforceVerify that the website is accessible.
Resolve the "534 Policy requires SSL" error
Cause
This error occurs when an FTP client attempts to connect using FTP over SSL/TLS (FTPS), but the destination IIS FTP site does not allow SSL connections. The server then rejects the client's handshake request.
Solution
Enable the SSL connection policy for the FTP site to match the client's security requirements.
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Configure the FTP site's SSL policy.
Click the target FTP site. In the FTP section of the home page, double-click FTP SSL Settings.

In the FTP SSL Settings section, set the SSL Policy to Allow SSL connections, then click Apply in the Actions pane.

Verify that the FTP site is accessible.
Resolve the "Bad Request - Invalid Hostname" error
Causes
The IIS server received an HTTP request but could not find a configured site that matched the hostname in the request header. This error has the following common causes:
Hostname not bound: The target website does not have a binding for the requested domain name.
Incorrect binding information: The website has a hostname binding, but it contains a spelling error or is bound to the wrong IP address or port.
Binding conflict: The domain name is already bound to another site in IIS, causing a request routing conflict.
Solution
To ensure the access domain name matches the site configuration, check and correctly configure the target site's bindings.
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Check and configure site bindings.
In the navigation pane on the left of the Internet Information Services (IIS) Manager page, click the target website, then click Bindings... in the Actions pane.

On the Site Bindings page, either add a new domain name binding or check if the existing binding information is correct.
Add a new binding.
On the Site Bindings page, click Add....
On the Add Site Binding page, enter the website's domain name in the Host name field, then click OK.
View or modify an existing binding.
On the Site Bindings page, double-click the existing binding record.
On the Edit Site Binding page, review the binding information.
If you need to modify the domain name, edit the Host name and click OK.
Verify that the website is accessible.
Resolve the "500.19 - Absolute physical path...is not allowed" error
Cause
A malformed or unrecognized XML element in the ApplicationHost.config or Web.config file causes this error.
ApplicationHost.config serves as the server's root configuration file, defining global defaults and server-level settings.The Web.config file provides application-level configuration, used to override or extend settings inherited from a higher level.Solution
Log on to the ECS instance.
Go to ECS console - Instance. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Open IIS Manager.
Click Start and select Server Manager.
In Server Manager, select .
Check the
web.configfile.In the navigation pane on the left of the Internet Information Services (IIS) Manager page, click the target website, then click Explore in the Actions pane to open the site's directory.

Open the
web.configfile in the site directory. Review the file and correct any errors, referring to the IIS Configuration Reference.
Check the
ApplicationHost.configfile.Go to the
C:\Windows\System32\inetsrv\config\folder and open theApplicationHost.configfile. Review the file and correct any errors, referring to the Introduction to ApplicationHost.config.Open Command Prompt and restart IIS.
iisreset /noforceVerify that the website is accessible.