500 internal server error in Windows server 2012 with IIS 8 for ASP.net core 6 mvc

cebuhax0r 26 Reputation points
2023-01-27T02:50:11.1333333+00:00

I know this is a common errors but i am getting desperate and frustrated.
I have published to folder my ASP.net Core 6 MVC application and deployed in a server running Windows 2012 and IIS 8 and I am getting the server error 500.

  1. I have tried going thru the event viewer to luck and no errors.
  2. modified web.config to look like 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=".\AARPNetCore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
		  <handlerSettings>
		<handlerSetting name="debugFile" value=".\logs\aspnetcore-debug.log" />
		<handlerSetting name="debugLevel" value="FILE,TRACE" />
	  </handlerSettings>
	  </aspNetCore>
    </system.webServer>
  </location>
</configuration>

  1. I manualy created the logs folder inside my applications root folder, but no logs are being written.
  2. i added app.UseDeveloperExceptionPage(); in Program.cs and nothing changed
  3. Deployed a debug version build but still there are no informations being thrown.
  4. enable log in aspsettings for all configurations
{
  "Logging": {
    "LogLevel": {
      "Default": "Warning",
      "Microsoft.AspNetCore": "Warning"
    }
  },
    "AllowedHosts": "*",
  "ConnectionStrings": {
    "DpScopicAARP": "Data Source=127.0.0.1,1433;Initial Catalog=RRS;User ID=rrs_debug;Password=password"
  }
}

I am running out of options here, does ASP.net core 6 doesnt run witn iis8 in windows 2012? what else should I do to see and know what is happening here?

No information what is the error, no logs being written. I dont know where to look for information.

Please help

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,201 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,187 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Limitless Technology 43,966 Reputation points
    2023-02-01T11:23:04.1833333+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.

    A 500 Internal Server Error in Windows Server 2012 with IIS 8 for an ASP.NET Core 6 MVC application can be caused by a number of issues, including:

    1. Incorrectly configured IIS: The IIS settings may be incorrect, preventing the application from running correctly.
    2. Incorrectly configured application pool: The application pool settings may be incorrect, causing the application to fail.
    3. Missing or incorrect .NET Framework version: The application may be requiring a different version of the .NET Framework than what is installed on the server.
    4. Incorrectly configured web.config file: The web.config file may be incorrect or missing required settings for the application.
    5. Missing or incorrect modules or handlers: The application may be requiring a missing module or handler in IIS.
    6. Incorrectly configured routing: The application's routing may be incorrectly configured.
    7. Incorrectly configured permissions: The application may not have the correct permissions to access the necessary resources.

    To troubleshoot this issue, you can try the following steps:

    1. Check the IIS log files for more information about the error.
    2. Check the Event Viewer for any related error messages.
    3. Check the web.config file for any errors or missing settings.
    4. Check the application pool settings to ensure that the correct .NET Framework version is selected.
    5. Check the IIS modules and handlers to ensure that the necessary modules and handlers are installed and configured correctly.
    6. Check the routing configuration in the application to ensure that it is set up correctly.
    7. Check the permissions on the application's folder to ensure that the application has the necessary permissions to access the resources it needs.
    8. Check the aspnetcore version installed in the server.

    It's important to note that this list is not exhaustive, as the error can be caused by other factors as well. But, these steps should help you to identify and solve the problem, but it is also important to check the application's code and system logs for more information about the error.

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    0 comments No comments