Хостинг веб-API. NET Core v2.2 на IIS дает 500 - PullRequest
0 голосов
/ 04 февраля 2020

Я пытаюсь разместить свой веб-API на базе. NET Core v2.2 на Windows 10 v1903.

У меня установлен IIS, он работает. Я установил. NET Core Hosting Bundle.

Я скопировал вывод из папки publi sh в папку inetpub / wwwroot: enter image description here

Я создал веб-сайт в IIS:

enter image description here

Этот веб-сайт использует пул приложений с CLR "Нет управляемого кода":

enter image description here

Это мой web.config:

<?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=".\MyAPI.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 3840a856-efc8-4efc-b593-556179293e4e-->

И он дает мне 500 внутренних ошибок сервера, когда я пытаюсь просмотреть на сайте.

enter image description here

Журналы:

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-02-04 01:32:33
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2020-02-04 01:32:33 ::1 GET / - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 13 514
2020-02-04 01:32:33 ::1 GET /favicon.ico - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 http://localhost:5050/ 500 19 13 0
2020-02-04 01:32:37 ::1 GET /swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 13 0
2020-02-04 01:32:37 ::1 GET /favicon.ico - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 http://localhost:5050/swagger 500 19 13 1
2020-02-04 01:33:02 ::1 GET /myapi/swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 13 0
2020-02-04 01:33:02 ::1 GET /favicon.ico - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 http://localhost:5050/myapi/swagger 500 19 13 2
2020-02-04 01:33:09 ::1 GET / - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 19 13 1
2020-02-04 01:33:09 ::1 GET /favicon.ico - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 http://localhost:5050/ 500 19 13 0
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-02-04 02:58:25
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2020-02-04 02:58:25 ::1 GET / - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 4473
2020-02-04 02:58:29 ::1 GET /swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 5
2020-02-04 02:58:37 ::1 GET /MyAPI/swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 4
2020-02-04 02:58:40 ::1 GET /MyAPI - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 3
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-02-04 02:59:15
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2020-02-04 02:59:15 ::1 GET / - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 1340
2020-02-04 02:59:18 ::1 GET /swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 4
2020-02-04 02:59:27 ::1 GET /MyAPI/swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 3
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2020-02-04 03:18:09
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2020-02-04 03:18:09 ::1 GET / - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 1836
2020-02-04 03:18:12 ::1 GET /swagger - 5050 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 - 500 0 0 5

Есть идеи?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...