web.config in asp.net MVC core Project

2019-08-25 09:37发布

问题:

I am really new to Asp.net MVC core , my visual studio is on macOS , so I had to publish my project on Azure. I wanted to transfer this project on Godaddy host. I download the files and uploaded on the Godaddy host. the problem is that it has Error 500. Is there any thing which I can do to fix it?

here is my webconfig ,

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <system.webServer>
     <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
      <aspNetCore processPath="dotnet" arguments=".\WebAppEver.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  </system.webServer>
  </configuration>
  <!--ProjectGuid: F0AEADEA-9B69-4295-85F3-A3BDD9433AD4-->

回答1:

Your host will need to setup their servers to support asp.net core. They must install the IIS module that supports asp.net core and allow the extra process to run that’s the asp.net core application.

You will also need to know what version of asp.net core is installed, or you should deploy a self hosted version.

For our shared hosting plans we do not offer asp .NET core 1 or 2. Best case is to get a server per the requirements to support asp .NET core 2.0. This requires any VPS or Dedicated environments running Plesk Onyx 17.8 for automated installer support.

Also, in order to see the detailed error message, add this to your web.config:

<configuration>
  <system.webServer>
      <httpErrors errorMode="Detailed"/>
  </system.webServer>
</configuration>