I am trying to publish my asp.net core project on IIS server. But again and again I am meeting the same error defined below and in attached picture too.
HTTP Error 500.19 - Internal Server Error Config Error Cannot read configuration file due to insufficient permissions Config File \?\C:\Users\PC\Desktop\publish\web.config
My web.config file looks like this:
<?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=".\CourseGamePlay.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 9F678AE2-FBFD-4FD4-8DBF-5811C4E16705-->
Help me out in it to solve this error. Thanks in advance.