I get this error when I access my app which I published to local IIS:
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
My web.config is really simple:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\TreesOnMars.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 14bfa9ba-0bd6-4ae2-a6f4-6e3e91d35263-->
What could be wrong? I tried giving all users permission to read my c:\inetpub\wwwroot
folder... the web.config doesn't have any obvious error in it! I tried some of the solutions at this question but they didn't work...
The web. config file has also been replaced in ASP.NET Core. Configuration itself can now be configured, as part of the application startup procedure described in Startup.
Application configuration in ASP.NET Core is performed using one or more configuration providers. Configuration providers read configuration data from key-value pairs using a variety of configuration sources: Settings files, such as appsettings. json.
yes we can run asp.net application without web. config file,if u r not configure any settings in web. config file then it will take machine.
You need to install the .NET Core hosting bundle to host .NET Core apps in IIS. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The link to the .NET Core 2.1 hosting bundle is here: https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.1.3-windows-hosting-bundle-installer
Also make sure the following Windows features are enabled:
More information can be found here:
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore2x
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