Release asp.net core application in IIS

Source: Internet
Author: User
Tags net core windows server hosting server hosting

In the near future, you need to publish the WEBAPI to IIS under the. NET Core framework for work reasons. Have suffered some devastation, hereby write down for later use.

First, there are 2 services in the work. One is IDENTITYSERVER4 service, responsible for the token of the distribution, one is our business webapi.

When the customer needs to call our Webapi, first go to Identityserver4 to apply for a token. Then use this token to visit our WEBAPI.


Authorized Server Identityserver4, is open source. can be obtained directly on Git. is developed based on the. NET Core. I'm using the. NET Core 1.0.

Here's how it's deployed. It is recommended to use the documentation provided by Microsoft. Document Address

Https://docs.microsoft.com/en-us/aspnet/core/publishing/iis

There are frequently asked questions common errors and workaround troubleshooting the document.

Because the server is server2012, the IIS version used is 8.5. Support itself supports. NET 4.5


1. Install IIS webserver

2 Installing the. NET core Windows Server hosting bundle

Note After the installation is complete, reboot the server, or perform net stop was/y followed by net start w3svc from command prompt to pick up a Chang E to the system PATH

Otherwise, it will be reported

502.3 Bad Gateway-there is a connection error while trying to route the request

Although it is mentioned in the troubleshooting in the document, it does not solve the problem according to that. It still has to be restarted. or that order.

3 Installing the. NET Core runtime library, the. NET Core SDK that I installed

Run dotnet in CMD to verify that the installation is correct.

4 the package released in VS, Put into IIS, very ordinary Web site publishing.

But in the application pool, the. NET Framework chooses to have no managed code.


The second WEBAPI publication is the same as the General MVC Web release.

5 If you report 500 internal errors or Webapi do not log correctly, view the configuration of the log and Iisuser permissions on the folder.

This is no different from other website releases.

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.