D
D
Dima2312022-02-18 17:34:36
IIS
Dima231, 2022-02-18 17:34:36

IIS 8 does not understand web.config. How to fix?

Hello! I'm trying to host a site on IIS 8 on Server 2012. I installed everything I need (Windows Hosting Bundle), I also installed everything. If you simply place index.html in the site folder, then the site is accessible from any computer on the network. But if you publish and place the simplest Asp .net core application in it, it constantly gives an error 500. I looked at the event log and there is the following error: Could not load configuration. Exception message:
Attribute 'processPath' is required. I understand that the server does not like the web.config file. But it lies in the root of the site and processPath is in it. Here is its content.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet"
                  arguments=".\TestAsp.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
//****************
Пробовал такой вариант. Не работает.
<aspNetCore processPath=".\TestAsp.exe"  stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />

//****************
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: effefb68-20e4-4527-a51c-acb8e3499a4b-->


Please tell me how to start the site.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Leonid, 2022-02-18
@caballero

core.net does not require any web.config
check which pool for this site in the IIS setting
should be set to custom and not those for standard .NET

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question