I published my asp.net core mvc into a folder, copied the folder to my IIS, got this…
- User
I published my asp.net core mvc into a folder, copied the folder to my IIS, got this error "HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.
Most likely causes: A default document is not configured for the requested URL, and directory browsing is not enabled on the server."
- Assistant
To resolve this issue, you need to follow these steps:
- Open IIS Manager on the server where your website is hosted.
- Select the website that you want to configure.
- Click on the "Default Document" icon in the Features View.
- Ensure that the default document for your website is configured correctly.
- If the default document is configured correctly, check whether directory browsing is enabled on the server.
- To enable directory browsing, select the website in IIS Manager, click on the "Directory Browsing" icon in the Features View, and then click on "Enable" in the Actions panel.
- Once you have enabled directory browsing, try accessing the website again to see if the issue has been resolved.
If you continue to experience issues after following these steps, you may need to review your application settings and code to ensure that they are correct and compatible with the version of ASP.NET Core that you are using.
- User
the default document doesn't contain cshtml
- Assistant
If your default document does not contain a
.cshtmlfile, you will need to add it to the list of default documents in IIS Manager. To do this, follow these steps:- Open IIS Manager on the server where your website is hosted.
- Select the website that you want to configure.
- Click on the "Default Document" icon in the Features View.
- Click on "Add..." in the Actions panel.
- Enter the name of the
.cshtmlfile that you want to use as your default document and click on "OK". - Ensure that the newly added default document is at the top of the list in the "Default Document" list. If it is not, select it and click on "Move Up" until it is at the top of the list.
- Click on "Apply" or "OK" to save the changes.
Once you have added the
.cshtmlfile as a default document, try accessing your website again to confirm that the issue has been resolved. - User
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.
- Assistant
The "HTTP Error 403.14 - Forbidden" error occurs when IIS is not configured to display the directory listing for the website folder. This means that even though your website is deployed to the server, IIS cannot list the files and directories in the root folder of the website.
To fix this error, you should try following these steps:
- Open IIS Manager on the server where your website is hosted.
- Select the website that you want to configure.
- Click on the "Directory Browsing" icon in the Features View.
- Click on "Enable" in the Actions panel to enable directory browsing.
- Check to ensure that the folder containing your website is configured as an application in IIS Manager. To do this, right-click on the folder in the Connections pane and select "Convert to Application". If it is already configured as an application, you can skip this step.
- Ensure that you have a default document configured for the website. To do this, click on the "Default Document" icon in the Features View and make sure that at least one default document is added to the list.