2

I have simple website which I am trying to run through IIS. But on browsing the website it throws error saying

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

enter image description here


Below is my web.config code that is have

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
<system.webServer>
  <handlers>
    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
  </handlers>
  <aspNetCore processPath="dotnet" arguments=".\AlphaWeb.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
  </location>
</configuration>


Any help will be great. Thank you

redcaper71
  • 287
  • 3
  • 6
  • 13

2 Answers2

0

You probably have an invalid character or encoding on your web.config. Try opening it on a tool like Notepad++ and enable "View > Show Symbol > Show all Characters". You can also try setting it to UTF-8.

tvdias
  • 821
  • 2
  • 10
  • 25
-1

try to update your web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <remove name="aspNetCore" />
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
    </system.webServer>
  </location>
</configuration>
Serhii Matvienko
  • 292
  • 3
  • 15