Summary of IIS problems deployed on the abc.net Core, abpcore
Create a. Net Core project on the ABC website and complete compilation.
1. Publish a website
2. Create a site in IIS
Directory to the published directory
3. Install WindowsHosting
Install DotNetCore. X-WindowsHosting on the IIS Installation server and restart the IIS server. Download by version
: Https://www.microsoft.com/net/download/windows
If the SDK is not installed, install the. Net Core SDK.
4. modify the application pool and select the unmanaged code.
5. Browsing Program
The following error is reported:
An error occurred while starting the application.
You cannot see the details. You need to modify web. config to view the details.Change stdoutLogEnabled to true.And in the application root directoryAdd logs folder
<AspNetCore processPath = "dotnet" arguments = ". \ tzky. saas. web. host. dll "stdoutLogEnabled =" true "stdoutLogFile = ". \ logs \ stdout "forwardWindowsAuthToken =" false "/>
When I browsed the website, I still reported an error. Now I can view the error details in the logs directory.
Error message: logon to 'iis APPPOOL \ saasapp' failed.
6. error diagnosis and Solution
Error analysis is clearly an application permission issue. You only need to go to the application pool> advanced> to change the original ApplicationPoolIdentity to a user with read and write permissions on the website file, and then restart the application pool, restart website browsing
Running started successfully
7. Summary
. Net Core and traditional. Net Program IIS deployment mainly pay attention to the following points:
- Install DotNetCore. X-WindowsHosting and. Net Core sdks
- The application pool is configured with unmanaged code (explained on the Internet: ASP. NET coreis no longer hosted by iisjob (w3wp.exe), but run on a self-hosted Web server (Kestrel). IIS forwards requests to ASP on different ports as a reverse proxy. in the NET Core program, the received requests are pushed to the middleware pipeline. After processing your requests and related business logic, the HTTP Response Data is re-written to IIS, finally, it is transferred to different clients (such as browsers, apps, and clients ). The configuration file and process will be slightly adjusted. The most important role in the process is AspNetCoreModule, which is one of the IIS modules. After requests enter IIS, they will be forwarded immediately, and quickly redirect to ASP.. NET Core project, so we do not need to set an application pool to host our code at this time, it is only responsible for forwarding requests)
- If you need to read and write the root directory permission, you need to change the ApplicationPoolIdentity of the application pool.
- The website reports an error. You can modify web. config to enable the error log to view detailed error information.