NET Core local IIS how to determine application pool user

-2

I have IIS on Windows 10. I've published webpage in .NET Core 3.0 and I got error:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:
Module     IIS Web Core
Notification       BeginRequest
Handler    Not yet determined
Error Code     0x8007000d
Config Error       
Config File    \\?\C:\inetpub\wwwroot\myapp\web.config
Requested URL      http://localhost:80/myapp/
Physical Path      C:\inetpub\wwwroot\myapp\
Logon Method       Not yet determined
Logon User     Not yet determined

I've checked in the Internet and I've found that:

https://stackoverflow.com/questions/929131/how-do-i-resolve-http-error-500-19-internal-server-error-on-iis7-0


   Looks like the user account you're using for your app pool doesn't have rights to the web site
 directory, so it can't read config from there. Check the app pool and see what user it is 
configured to run as. Check the directory and see if that user has appropriate rights to it. While 
you're at it, check the event log and see if IIS logged any more detailed diagnostic information 
there.

But I don't know what is name of the user from application pool. When I typed DefaultAppPool and the Check names, it shows me that user don't exists.

How to check that user?

iis
.net-core
asked on Stack Overflow May 25, 2020 by Robert

1 Answer

0

The error meessage just similar to this case

enter image description here

https://forums.asp.net/t/2152289.aspx?Problem+occur+when+hosting+ASP+NET+core+2+1+project+locally+on+computer+

Please ensure .net core webhosting bundle has been installed:

https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-3.1&tabs=visual-studio

At the same time, please ensure you are deploying the project via web deployment tool. Because manual publish IIS won't register ASPNETCORE handler automatically.

In process and out process would have different handler settings.

framework-depenent:

<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet"
                  arguments=".\MyApp.dll"
                  stdoutLogEnabled="false"
                  stdoutLogFile=".\logs\stdout"
                  hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

self-contained

<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\MyApp.exe"
                  stdoutLogEnabled="false"
                  stdoutLogFile=".\logs\stdout"
                  hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-3.1

answered on Stack Overflow May 25, 2020 by Jokies Ding

User contributions licensed under CC BY-SA 3.0