Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS HTTP Error 500: The requested Page cannot be accessed because related configuration data is invalid [duplicate]

I have successfully published an ASP.NET Core website on IIS (version 10) on my local machine (Windows 10) and browsed it.

However, when I deploy it on IIS on another PC (using same versions), it gives HTTP Error 500.19:

enter image description here

I am using the same Web.config and IIS_IUSRS has permissions on both the virtual directory and config file. I also added the permission for the app pool `IIS AppPool/MyPool' to the virtual directory. Here is the web.config:

<?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=".\IdentityServer.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
  </system.webServer>
</configuration>

What is problem?

like image 740
Hussein Salman Avatar asked Nov 18 '16 19:11

Hussein Salman


People also ask

How do I resolve HTTP error 500 in IIS?

IIS error The error 500.19 is an internal server error often occurring on a server using Microsoft IIS software. It indicates that the configuration data for the page is invalid. To solve the issue, delete the malformed XML element from the Web. config file or from the ApplicationHost.

How do you fix the requested page Cannot be accessed because the related configuration data for the page is invalid?

The requested page cannot be accessed because the related configuration data for the page is invalid. This problem can occur if the specified content directory cannot be accessed. Verify that the file path exists. Verify that the file path is correctly named.

How do I fix 500.19 error in IIS?

Fix this issue by removing the MIME type entry ". *", or replacing it with ".". On the OSCE server, go to Control Panel > System and Security > Administrator Tools and double-click Internet Information Services (IIS) Manager. On the left panel, select OfficeScan.

How do you verify that the application pool identity account of this web application has sufficient permissions to open the web config file?

Go to the parent folder, right-click and select Properties. Select the Security tab, edit the permissions and Add. Click on Advanced and the Find Now. Select IIS_IUSRS and click OK and OK again.


1 Answers

It was missing the NET Core Windows Server Hosting bundle, I have realized that from the web.config "AspNetCoreModule".

You can find the link here

like image 189
Hussein Salman Avatar answered Oct 02 '22 07:10

Hussein Salman