From b17956479980184e6075e3a6feb0e2f56e5e5377 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 28 Jun 2019 15:59:26 +0800 Subject: [PATCH] asp.net core InProcess hosting SetCurrentDirectory. --- samples/BookStore/src/Acme.BookStore.Web/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/BookStore/src/Acme.BookStore.Web/Program.cs b/samples/BookStore/src/Acme.BookStore.Web/Program.cs index bef69a6bd0..a1080543cc 100644 --- a/samples/BookStore/src/Acme.BookStore.Web/Program.cs +++ b/samples/BookStore/src/Acme.BookStore.Web/Program.cs @@ -1,6 +1,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.InProcess; using Serilog; using Serilog.Events; @@ -10,6 +11,8 @@ namespace Acme.BookStore.Web { public static int Main(string[] args) { + CurrentDirectoryHelpers.SetCurrentDirectory(); + Log.Logger = new LoggerConfiguration() #if DEBUG .MinimumLevel.Debug() @@ -42,8 +45,8 @@ namespace Acme.BookStore.Web new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() .UseIIS() + .UseIISIntegration() .UseStartup() .UseSerilog() .Build();