asp.net core deployed on IIS

Source: Internet
Author: User
Tags server hosting

1. Download and install Windows Server Hosting, which is to allow IIS to have the reverse proxy function (asp.net Core module is responsible for reverse proxy work), forwarding the request to the Kestrel

2. There are two ways to publish a Web site: by using the CLI dotnet Publish command, or by using Visual Studio to publish
View the Web.config file in the published folder, stdoutlogenabled= "true" and create a new logs folder, because Web.config set the log output directory stdoutlogfile= ". \logs\ StdOut ", and the logs folder is not generated when it is published and needs to be created manually.

3. Deploying in IIS, as in previous releases, the change is that the application pool is no longer a. NET CLR, but rather that it has no managed code selected. Then browse the published website.

4. The results of the visit error. Newspaper "Anerror occurred while starting the application", and then under the Logs folder to view the log, told me the lack of files, resulting in the report of this error. Because I have XML annotations enabled in the project, all comments are generated into an XML file, and the XML file is not exported to the publishing folder when it is published, and is normally accessed manually.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.