支持挂接到Windows服务执行

This commit is contained in:
falcon 2020-05-27 15:44:36 +08:00
parent 75d738a857
commit 855cc6b36e
2 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,7 @@ namespace ReportService
Host.CreateDefaultBuilder(args) Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => { .ConfigureWebHostDefaults(webBuilder => {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}); })
.UseWindowsService();
} }
} }

View File

@ -9,5 +9,6 @@
"AllowedHosts": "*", "AllowedHosts": "*",
"Database": { "Database": {
"ReportService": "Server=.\\SQLSERVER2008R2;Database=ReportService;User ID=sa;Password=111" "ReportService": "Server=.\\SQLSERVER2008R2;Database=ReportService;User ID=sa;Password=111"
} },
"urls": "http://*:9000;https://*:9001"
} }