What is. Net Core?
. NET core is another Microsoft-developed. NET that can span Linux, Windows, Macs, and other platforms.
. Net core related knowledge look at the article to the point
dotnet Dllname.dll Run
PostMan is a very professional tool for debugging WEBAPI
ASP. NET Core Configuration
Setting the boot port
CMD--Set aspnetcore_urls=http://127.0.0.1:8080 (reading this configuration in the program is difficult)
modifying ports through code
The Createwebhostbuilder (. NET core 2.1)/Createdefaultbuilder (. NET Core 2.0) method under program is the last. Userurls ("http://127.0.0.1:9999"); (Written dead)
Setting up a boot port with a command configuration
Modify the Createwebhostbuilder (. NET core 2.1)/Createdefaultbuilder (. NET Core 2.0) method under Program
Gets the IP and port number that is passed in the cmd command.
var config = new Configurationbuilder (). Addcommandline (args). Build ();
String IP = config["IP"];
String prot = config["Port"];
In the end. Useurls ($ "http://{ip}:{port}");
Call cmd, dotnet name.dll--ip 127.0.0.1--port 8888
----------
Webapi is a restful style, the request response is preferably in JSON format
. Netcore Webapi and MVC became the same controller's parent class. NET is not much different from the use of
Error by status code instead of response body, is restful style
. Net Core Related Materials
https://windsting.github.io/little-aspnetcore-book/book/
Https://docs.microsoft.com/zh-cn/aspnet/core/
. Net Core WebApi
https://docs.microsoft.com/zh-cn/aspnet/core/web-api/?view=aspnetcore-2.1
(2) Micro-service Micro-service----. Netcore boot Configuration and. Netcorewebapi