I have a .NET Core application which works on one machine but not on another.
The problem is that the application fails to load, because the IIS does not recognize the following
<aspNetCore processPath="dotnet" arguments=".\MyApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
The result is that when I click on the IIS authentication configuration, I get an error. If I remove the aspNetCore
tag I can view the authentication settings, but then the application doesn't actually start.
Before you start giving advice about not using web.config
for .NET Core, remember that it works on my other machine. Also, I need to use Windows Security and ASP.NET Impersonation.
Both machines are running Windows 10 Pro, and I have checked the following
I don't normally work with IIS and .NET, so I'm quite puzzled that my application breaks on one of two seemingly identical installations. I have run out of things to check. Any help or pointers would be greatly appreciated.
Here is the complete web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
<identity impersonate="true" />
</system.web>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: a447f5e7-6aee-4d26-bef4-c7111a88c409-->
Setup configurationASP.NET Core no longer uses the Global. asax and web. config files that previous versions of ASP.NET utilized.
In order to set up the ASP.NET Core Module correctly, the web. config file must be present at the content root path (typically the app base path) of the deployed app.
web. config file is an XML-based configuration file used in ASP. NET-based applications to manage various settings that are concerned with the configuration of our website. In this way, we can separate our application logic from configuration logic.
IIS and ASP.NET Core The most important thing to understand about hosting ASP.NET Core is that it runs as a standalone, out of process Console application. It's not hosted inside of IIS and it doesn't need IIS to run.
I was also facing the same issue and it was because the machine
was missing the NET Core Windows Server Hosting bundle. If this is not installed then IIS cannot recognize the aspNetCore
section in web.config
You can install the bundle from below location.
NET Core Windows Server Hosting bundle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With