ABP. Net Core deployment to IIS issues Rollup

Source: Internet
Author: User

Article Source: https://www.cnblogs.com/donaldtdz/p/7802096.html

Create a. Net core project at the ABP website compile complete

1. Publishing website

2. IIS New site

Directory point to published directory

3, Installation windowshosting

Install Dotnetcore.x.x.x-windowshosting on the IIS installation server after the installation is successful, restart the IIS server. Select Download According to version

: Https://www.microsoft.com/net/download/windows.

Download the above official website did not complete success, and then went online to find a download complete success.

http://download.csdn.net/download/fushangde123/10272240

If you do not have the SDK installed, you need to install the. Net Core SDK

4. Modifying the application Pool application pool Select No managed code

5. Browse Programs

The error is as follows:

An error occurred while starting the application.

You cannot see the details you need to modify the Web. config view details to change stdoutlogenabled to Trueand add the Logs folder to the application root directory

<aspnetcore processpath= "dotnet" arguments= ". \tzky.saas.web.host.dll" stdoutlogenabled= "true" stdoutLogFile= ". \ Logs\stdout "forwardwindowsauthtoken=" false "/>

Browse the website again, of course, error, now to logs directory to see the error details

Error message: User ' IIS Apppool\saasapp ' logon failed

6. Error diagnosis and resolution

Error analysis is obviously a problem with application permissions, as long as the identity of the application pool, advanced Change the original applicationpoolidentity to a Windows user with access to the database and read and write access to the Web site file (here you need to make sure that this Windows user can log in to the database, not in database security settings.) Of course you can also change the database connection character to database user and password access, for example: SA), then restart the application pool, restart the site browsing

Start Run successful

7. Summary

The following are key considerations for. NET Core and legacy. NET Program IIS deployments:

    • Installing the dotnetcore.x.x.x-windowshosting and. Net Core SDK
    • Application pool configured as unmanaged code (online Explanation: ASP. Core is no longer hosted by the IIS worker process (w3wp.exe), but is run with a self-hosted Web server (Kestrel), and IIS is a reverse proxy role forwarding request to an ASP. NET Core program that Kestrel different ports. The received request is then pushed to the middleware pipeline, and the HTTP response data is then written back to IIS after processing your request and related business logic, eventually to different clients (browsers, apps, clients, etc.). While the configuration files and procedures will be slightly adjusted, the most important role in the middle is aspnetcoremodule, which is one of the IIS modules, the request is immediately forwarded to IIS, and quickly redirected to the ASP. So at this point we don't need to set up the application pools hosting our code, it is only responsible for forwarding the request only)
    • If you need to read and write root permissions, change the application pool applicationpoolidentity
    • Web site error, by modifying the Web. config to enable fault log view detailed error information

Source: https://www.cnblogs.com/donaldtdz/p/7802096.html

ABP. Net Core deployment to IIS issues Rollup

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.