0

I published my code to our IIS server and I am getting this error. From many recommendation that I read online, I installed Url rewrite but it does not seem to fix the issue. This error points to Web.Config and I don't see any problem with it as it was also auto-generated. Everything works when I test it in IIS Express on Visual Studio 2019. Any idea? see code below:

<?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=".\forms.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>
gfortin
  • 11
  • check your logs. – Daniel A. White Feb 19 '20 at 19:38
  • I concur. A detailed examination of your logs is the only way to find the actual problem. – Robert Harvey Feb 19 '20 at 19:39
  • logging file under C:\inetpub\logs\LogFiles\... has no errors – gfortin Feb 19 '20 at 20:32
  • ok, finally got some logs:#Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2020-02-19 20:31:08 #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-19 20:31:08 ::1 GET /forms - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 500 19 13 20 – gfortin Feb 19 '20 at 20:49

1 Answers1

-1

try installing DotNetCore.1.0.0-WindowsHosting.exe from this page: https://www.microsoft.com/net/download .

Specific link to download: https://go.microsoft.com/fwlink/?LinkId=817246

kannangokul
  • 84
  • 1
  • 10
  • I installed DotNetCore from the link and this did not fix my issue. It's still a mystery that I can't seem to resolve. Hoping someone got the same issue, It's a very simple MVC with an index page... not sure why it's giving me such a hard time. – gfortin Feb 19 '20 at 20:38
  • `AspNetCoreModuleV2` indicates a project targeting .NET Core 2.x and above, so pointing to .NET Core 1.0 hosting bundle is useless. – Lex Li Feb 19 '20 at 22:15
  • it actually downloaded Dot Net Core 3.1.102, IIS server is also the same. still getting that error. I am thinking that maybe the Web Config might not be pointing to the right module. – gfortin Feb 19 '20 at 22:22
  • You just need to install this package below. After that you can use the AspNetCoreModuleV2 :) https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.2-windows-hosting-bundle-installer When installing, please notice to install as administrator. As part of the installation the applicationHost.config file will be updated to include AspNetCoreModuleV2 and its dll. this is one of the reasons why it's important to run installation with admin privilege. I credit this to MaartenDev and Marcos Rodrigues https://stackoverflow.com/questions/53729956/aspnetcore-2-2-0-aspnetcoremodulev2-error – gfortin Feb 19 '20 at 22:36