Deploy to IIS:
Programs developed by 1.net Core can be deployed on IIS
Unlike the ASP. NET era, ASP. NET core is no longer hosted by the IIS worker process (w3wp.exe).
Instead, it runs with a self-hosted Web server (Kestrel).
IIS is the role of the reverse proxy to forward requests to kestrel different ports in the ASP.
No need to set up the application pools hosting our code, it is only responsible for forwarding the request.
Make sure that the Aspnetcoremodule managed module is already installed on your system before deploying
Normal Site Deployment application pool selection unmanaged
. NET core deployed on Ubuntu:
2. Deploy the net Core website to Ubuntu
1. Install the. NET Core SDK
2. Copy the published website to Ubuntu
3.dotnet ***.dll
. dll is the portal connection library generated by the project
4..Net Core created by default after the deployment of the project, can only be accessed within the local, external through the IP is not open,
Can be implemented by configuring Nginx. You can also modify Program.cs by modifying the
var host = new Webhostbuilder ()
. Usekestrel ()
. Useurls ("http://*:5000")
. Usecontentroot (Directory.GetCurrentDirectory ())
. Useiisintegration ()
. Usestartup<startup> ()
. Build ();
Host. Run ();
5. External access to the website via IP
To create a Netcore Web site on windows:
1. Installing the SDK
2. First create a folder mkdir Hwapp,
Then CD Hwapp into the directory,
Finally dotnet new is to create a simple C # program
In fact, two files were created under the newly created Hwapp folder.
Join in the Project.json
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0"
That is, increase the Kestrel HTTP server package as a dependency
3. Run the command dotnet restore
Used to fix specific packages in Project.json
4. Create a Startup.cs program
Create a file named Startup.cs in the Hwapp above
The file is written to the website program
5. Modify Program.cs
6. Execute command dotnet Run,
7. Enter a URL in the address bar to access
. NET core Web site Deployment