Closed shorbachuk closed 5 years ago
Hello @shorbachuk ,
Thank you very much by open the issue.
I have uploaded a new branch within a sample that I hopefully configured to run within the netcore 2.2 preview version, and using a small modification that I have introduced in the code in order to test the scenario you are trying to arrange.
Could you clone this repository on your local, branch feature/51, and review the sample called Sample.WebApi_NetCore22 in order to:
Let me know the results, as per my tests on my local, the resolution is working properly.
Thank you.
I did look at the changes and I think that would fix it. I should have some time tomorrow to test it out and let you know.
Thank you very much @shorbachuk . I will wait until you can test it properly. Let me know the results.
Unfortunately, it still does not work. Still picking up the path for the IIS path. It looks like Path.Combine(AppContext.BaseDirectory, "log4net.config") is the only thing I can find that resolves properly.
Branch updated. Can you test it again? Sorry by the inconveniences.
This one works hosted inprocess in IIS. Did not test out of process, but looks good thank you.
Hi @shorbachuk ,
Now the fix is included on v.2.2.6 (https://www.nuget.org/packages/Microsoft.Extensions.Logging.Log4Net.AspNetCore/2.2.6)
Thank you by your time.
I am trying to use the new .NET core 2.2 inprocess hosting model, however this package is trying to load log4net.config from the wrong path:
Application startup exception: System.IO.FileNotFoundException: Could not find file 'c:\windows\system32\inetsrv\log4net.config'.
https://blogs.msdn.microsoft.com/webdev/2018/09/12/asp-net-core-2-2-0-preview2-now-available/