Asp net error 500 internal server error

I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when visiting it with the browser, it shows me this: Server Error 500 - Internal server error. There is a problem...

Probably your web.config file is wrong or is missing some tag. I solved my problem using the correct config tags for .NET 4.

<system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
        <assemblies>
            <add assembly="System.Deployment, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        </assemblies>
    </compilation>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
        <namespaces>
            <clear/>
            <add namespace="System"/>
            <add namespace="System.Collections"/>
            <add namespace="System.Collections.Specialized"/>
            <add namespace="System.Configuration"/>
            <add namespace="System.Text"/>
            <add namespace="System.Text.RegularExpressions"/>
            <add namespace="System.Web"/>
            <add namespace="System.Web.Caching"/>
            <add namespace="System.Web.SessionState"/>
            <add namespace="System.Web.Security"/>
            <add namespace="System.Web.Profile"/>
            <add namespace="System.Web.UI"/>
            <add namespace="System.Web.UI.WebControls"/>
            <add namespace="System.Web.UI.WebControls.WebParts"/>
            <add namespace="System.Web.UI.HtmlControls"/>
        </namespaces>
    </pages>
    <authentication mode="None"/>
</system.web>

User-1158769213 posted

Hello,

I’m just starting with ASP.NET Core, and tried to deploy one today. I was faced with the above error when I tried to load it.

I started VS2017, created a new MVC Core site, and published. I didn’t change a thing, just published the site as it came out of the box.

I then copied the contents of the binReleasenetcoreapp2.2publish folder to my hosting company via FTP, and tried to load the site in a browser.

The hosting company installed Core 2.2 on the server. Do they need to do anything else? I only have control panel access (via SolidCP) to the server, not remote access, so there’s only so much I can do.

If I look in my control panel for the site, I see the following warning…

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. —> System.Runtime.InteropServices.COMException: Filename: \?D:HostingSpacestestusertest.mydomain.co.ukwwwrootweb.config 
Error: 

at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.GetAdminSection(String bstrSectionName, String bstrSectionPath) 
at Microsoft.Web.Administration.Configuration.GetSectionInternal(ConfigurationSection section, String sectionPath, String locationPath) 
at SolidCP.Providers.Web.Iis.DirectoryBrowse.DirectoryBrowseModuleService.GetDirectoryBrowseSettings(ServerManager srvman, String siteId) 
at SolidCP.Providers.Web.IIs70.FillAppVirtualDirectoryFromIISObject(ServerManager srvman, WebAppVirtualDirectory virtualDir) 
at SolidCP.Providers.Web.IIs70.GetSite(String siteId) 
at SolidCP.Providers.Web.IIs80.GetSite(String siteId) 
at SolidCP.Server.WebServer.GetSite(String siteId) 
— End of inner exception stack trace — 
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) 
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
at SolidCP.Providers.Web.WebServer.GetSite(String siteId) 
at SolidCP.EnterpriseServer.WebServerController.GetWebSite(Int32 siteItemId) 
at SolidCP.EnterpriseServer.esWebServers.GetWebSite(Int32 siteItemId) 
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) 
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
at SolidCP.EnterpriseServer.esWebServers.GetWebSite(Int32 siteItemId) 
at SolidCP.Portal.WebSitesEditSite.BindWebSite()

The web.config file it mentions 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=".BasicCoreSite.dll" stdoutLogEnabled="false" stdoutLogFile=".logsstdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 2fbe438c-a8b2-4b5b-8224-eb5dfcb62107-->

I tried changing the value of stdoutLogEnabled to «true» to see if that would give me a log file, but I couldn’t see anything appear.

Anyone any idea what went wrong? The hosting company don’t know much about Core, so can’t help.

Thanks for any help you can give.

Error Description:

  • When we try to deploy an ASP.NET application, after deploying the site to IIS, when visiting it with the browser, it shows this:

Server Error 500 — Internal server error.

  • There is a problem with the resource you are looking for, and it cannot be displayed.
  • web.config:
  • The page cannot be displayed because an internal server error has occurred.

Solution 1:

  • First, you need to enable and see detailed errors of your web messages, because this is a general message without giving information on what’s really happening for security reasons.
  • With the detailed error, you can locate the real issue here.
  • Also, if you can run the browser on the server, you get details on the error, because the server recognizes that you are local and shows it to you. Or if you can read the logb> of the server using the Event Viewer, you also see the details of your error.

On IIS 6
On IIS 6

<configuration>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>
click below button to copy the code. By asp.net tutorial team

On IIS 7

<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <asp scriptErrorSentToBrowser="true"/>
    </system.webServer>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true"/>
    </system.web>
</configuration>
click below button to copy the code. By asp.net tutorial team

Note: You can avoid the Debug=true. You only need to close the custom errors for a while and get the detailed error page.

Solution 2:

  • Making sure the following entry was in the root web.config file fixed it for me:
<configuration>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>
</configuration>
click below button to copy the code. By asp.net tutorial team
  • Remember that you have to add this to the existing XML elements, if they’re already there. You can’t just add at the end of the file, because you can’t have multiple copies of any element.

Solution 3:

  • Make sure to change the existingResponse attribute of the httpErrors node to Auto from Replace, or to remove that property entirely.
<httpErrors existingResponse="Replace" />
                              ^^^^^^^ not going to work with this here
click below button to copy the code. By asp.net tutorial team

Solution 4:

  • Probably your web.config file is wrong or is missing some tag. Check it.
title author description monikerRange ms.author ms.custom ms.date uid

Common error troubleshooting for Azure App Service and IIS with ASP.NET Core

rick-anderson

Provides troubleshooting advice for the most common errors when hosting ASP.NET Core apps on Azure Apps Service and IIS.

>= aspnetcore-2.1

riande

mvc

3/07/2022

host-and-deploy/azure-iis-errors-reference

Common error troubleshooting for Azure App Service and IIS with ASP.NET Core

:::moniker range=»>= aspnetcore-2.2″

This topic describes the most common errors and provides troubleshooting advice when hosting ASP.NET Core apps on Azure Apps Service and IIS.

See xref:test/troubleshoot-azure-iis information on common app startup errors and instructions on how to diagnose errors.

Collect the following information:

  • Browser behavior such as status code and error message.
  • Application Event Log entries
    • Azure App Service: See xref:test/troubleshoot-azure-iis.
    • IIS
      1. Select Start on the Windows menu, type Event Viewer, and press Enter.
      2. After the Event Viewer opens, expand Windows Logs > Application in the sidebar.
  • ASP.NET Core Module stdout and debug log entries
    • Azure App Service: See xref:test/troubleshoot-azure-iis.
    • IIS: Follow the instructions in the Log creation and redirection and Enhanced diagnostic logs sections of the ASP.NET Core Module topic.

Compare error information to the following common errors. If a match is found, follow the troubleshooting advice.

The list of errors in this topic isn’t exhaustive. If you encounter an error not listed here, open a new issue using the Content feedback button at the bottom of this topic with detailed instructions on how to reproduce the error.

[!INCLUDEAzure App Service Preview Notice]

OS upgrade removed the 32-bit ASP.NET Core Module

Application Log: The Module DLL C:WINDOWSsystem32inetsrvaspnetcore.dll failed to load. The data is the error.

Troubleshooting:

Non-OS files in the C:WindowsSysWOW64inetsrv directory aren’t preserved during an OS upgrade. If the ASP.NET Core Module is installed prior to an OS upgrade and then any app pool is run in 32-bit mode after an OS upgrade, this issue is encountered. After an OS upgrade, repair the ASP.NET Core Module. See Install the .NET Core Hosting bundle. Select Repair when the installer is run.

Missing site extension, 32-bit (x86) and 64-bit (x64) site extensions installed, or wrong process bitness set

Applies to apps hosted by Azure App Services.

  • Browser: HTTP Error 500.0 — ANCM In-Process Handler Load Failure

  • Application Log: Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. Could not find inprocess request handler. Captured output from invoking hostfxr: It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}-preview-*’ was not found. Failed to start application ‘/LM/W3SVC/1416782824/ROOT’, ErrorCode ‘0x8000ffff’.

  • ASP.NET Core Module stdout Log: It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}-preview-*’ was not found.

  • ASP.NET Core Module Debug Log: Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. This most likely means the app is misconfigured, please check the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App that are targeted by the application and are installed on the machine. Failed HRESULT returned: 0x8000ffff. Could not find inprocess request handler. It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}-preview-*’ was not found.

Troubleshooting:

  • If running the app on a preview runtime, install either the 32-bit (x86) or 64-bit (x64) site extension that matches the bitness of the app and the app’s runtime version. Don’t install both extensions or multiple runtime versions of the extension.

    • ASP.NET Core {RUNTIME VERSION} (x86) Runtime
    • ASP.NET Core {RUNTIME VERSION} (x64) Runtime

    Restart the app. Wait several seconds for the app to restart.

  • If running the app on a preview runtime and both the 32-bit (x86) and 64-bit (x64) site extensions are installed, uninstall the site extension that doesn’t match the bitness of the app. After removing the site extension, restart the app. Wait several seconds for the app to restart.

  • If running the app on a preview runtime and the site extension’s bitness matches that of the app, confirm that the preview site extension’s runtime version matches the app’s runtime version.

  • Confirm that the app’s Platform in Application Settings matches the bitness of the app.

For more information, see xref:host-and-deploy/azure-apps/index#install-the-preview-site-extension.

An x86 app is deployed but the app pool isn’t enabled for 32-bit apps

  • Browser: HTTP Error 500.30 — ANCM In-Process Start Failure

  • Application Log: Application ‘/LM/W3SVC/5/ROOT’ with physical root ‘{PATH}’ hit unexpected managed exception, exception code = ‘0xe0434352’. Please check the stderr logs for more information. Application ‘/LM/W3SVC/5/ROOT’ with physical root ‘{PATH}’ failed to load clr and managed application. CLR worker thread exited prematurely

  • ASP.NET Core Module stdout Log: The log file is created but empty.

  • ASP.NET Core Module Debug Log: Failed HRESULT returned: 0x8007023e

This scenario is trapped by the SDK when publishing a self-contained app. The SDK produces an error if the RID doesn’t match the platform target (for example, win10-x64 RID with <PlatformTarget>x86</PlatformTarget> in the project file).

Troubleshooting:

For an x86 framework-dependent deployment (<PlatformTarget>x86</PlatformTarget>), enable the IIS app pool for 32-bit apps. In IIS Manager, open the app pool’s Advanced Settings and set Enable 32-Bit Applications to True.

Platform conflicts with RID

  • Browser: HTTP Error 502.5 — Process Failure

  • Application Log: Application ‘MACHINE/WEBROOT/APPHOST/{ASSEMBLY}’ with physical root ‘C:{PATH}’ failed to start process with commandline ‘»C:{PATH}{ASSEMBLY}.{exe|dll}» ‘, ErrorCode = ‘0x80004005 : ff.

  • ASP.NET Core Module stdout Log: Unhandled Exception: System.BadImageFormatException: Could not load file or assembly ‘{ASSEMBLY}.dll’. An attempt was made to load a program with an incorrect format.

Troubleshooting:

  • Confirm that the app runs locally on Kestrel. A process failure might be the result of a problem within the app. For more information, see xref:test/troubleshoot-azure-iis.

  • If this exception occurs for an Azure Apps deployment when upgrading an app and deploying newer assemblies, manually delete all files from the prior deployment. Lingering incompatible assemblies can result in a System.BadImageFormatException exception when deploying an upgraded app.

URI endpoint wrong or stopped website

  • Browser: ERR_CONNECTION_REFUSED —OR— Unable to connect

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

  • ASP.NET Core Module Debug Log: The log file isn’t created.

Troubleshooting:

  • Confirm the correct URI endpoint for the app is in use. Check the bindings.

  • Confirm that the IIS website isn’t in the Stopped state.

CoreWebEngine or W3SVC server features disabled

OS Exception: The IIS 7.0 CoreWebEngine and W3SVC features must be installed to use the ASP.NET Core Module.

Troubleshooting:

Confirm that the proper role and features are enabled. See IIS Configuration.

Incorrect website physical path or app missing

  • Browser: 403 Forbidden — Access is denied —OR— 403.14 Forbidden — The Web server is configured to not list the contents of this directory.

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

  • ASP.NET Core Module Debug Log: The log file isn’t created.

Troubleshooting:

Check the IIS website Basic Settings and the physical app folder. Confirm that the app is in the folder at the IIS website Physical path.

Incorrect role, ASP.NET Core Module not installed, or incorrect permissions

  • Browser: 500.19 Internal Server Error — The requested page cannot be accessed because the related configuration data for the page is invalid. —OR— This page can’t be displayed

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

  • ASP.NET Core Module Debug Log: The log file isn’t created.

Troubleshooting:

  • Confirm that the proper role is enabled. See IIS Configuration.

  • Open Programs & Features or Apps & features and confirm that Windows Server Hosting is installed. If Windows Server Hosting isn’t present in the list of installed programs, download and install the .NET Core Hosting Bundle.

    Current .NET Core Hosting Bundle installer (direct download)

    For more information, see Install the .NET Core Hosting Bundle.

  • Make sure that the Application Pool > Process Model > Identity is set to ApplicationPoolIdentity or the custom identity has the correct permissions to access the app’s deployment folder.

  • If you uninstalled the ASP.NET Core Hosting Bundle and installed an earlier version of the hosting bundle, the applicationHost.config file doesn’t include a section for the ASP.NET Core Module. Open applicationHost.config at %windir%/System32/inetsrv/config and find the <configuration><configSections><sectionGroup name="system.webServer"> section group. If the section for the ASP.NET Core Module is missing from the section group, add the section element:

    <section name="aspNetCore" overrideModeDefault="Allow" />

    Alternatively, install the latest version of the ASP.NET Core Hosting Bundle. The latest version is backwards-compatible with supported ASP.NET Core apps.

Incorrect processPath, missing PATH variable, Hosting Bundle not installed, system/IIS not restarted, VC++ Redistributable not installed, or dotnet.exe access violation

  • Browser: HTTP Error 500.0 — ANCM In-Process Handler Load Failure

  • Application Log: Application ‘MACHINE/WEBROOT/APPHOST/{ASSEMBLY}’ with physical root ‘C:{PATH}’ failed to start process with commandline ‘»{…}» ‘, ErrorCode = ‘0x80070002 : 0. Application ‘{PATH}’ wasn’t able to start. Executable was not found at ‘{PATH}’. Failed to start application ‘/LM/W3SVC/2/ROOT’, ErrorCode ‘0x8007023e’.

  • ASP.NET Core Module stdout Log: The log file isn’t created.

  • ASP.NET Core Module Debug Log: Event Log: ‘Application ‘{PATH}’ wasn’t able to start. Executable was not found at ‘{PATH}’. Failed HRESULT returned: 0x8007023e

Troubleshooting:

  • Confirm that the app runs locally on Kestrel. A process failure might be the result of a problem within the app. For more information, see xref:test/troubleshoot-azure-iis.

  • Check the processPath attribute on the <aspNetCore> element in web.config to confirm that it’s dotnet for a framework-dependent deployment (FDD) or .{ASSEMBLY}.exe for a self-contained deployment (SCD).

  • For an FDD, dotnet.exe might not be accessible via the PATH settings. Confirm that C:Program Filesdotnet exists in the System PATH settings.

  • For an FDD, dotnet.exe might not be accessible for the user identity of the app pool. Confirm that the app pool user identity has access to the C:Program Filesdotnet directory. Confirm that there are no deny rules configured for the app pool user identity on the C:Program Filesdotnet and app directories.

  • An FDD may have been deployed and .NET Core installed without restarting IIS. Either restart the server or restart IIS by executing net stop was /y followed by net start w3svc from a command prompt.

  • An FDD may have been deployed without installing the .NET Core runtime on the hosting system. If the .NET Core runtime hasn’t been installed, run the .NET Core Hosting Bundle installer on the system.

    Current .NET Core Hosting Bundle installer (direct download)

    For more information, see Install the .NET Core Hosting Bundle.

    If a specific runtime is required, download the runtime from the .NET Downloads page and install it on the system. Complete the installation by restarting the system or restarting IIS by executing net stop was /y followed by net start w3svc from a command prompt.

Incorrect arguments of <aspNetCore> element

  • Browser: HTTP Error 500.0 — ANCM In-Process Handler Load Failure

  • Application Log: Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. This most likely means the app is misconfigured, please check the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App that are targeted by the application and are installed on the machine. Could not find inprocess request handler. Captured output from invoking hostfxr: Did you mean to run dotnet SDK commands? Please install dotnet SDK from: https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 Failed to start application ‘/LM/W3SVC/3/ROOT’, ErrorCode ‘0x8000ffff’.

  • ASP.NET Core Module stdout Log: Did you mean to run dotnet SDK commands? Please install dotnet SDK from: https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

  • ASP.NET Core Module Debug Log: Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. This most likely means the app is misconfigured, please check the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App that are targeted by the application and are installed on the machine. Failed HRESULT returned: 0x8000ffff Could not find inprocess request handler. Captured output from invoking hostfxr: Did you mean to run dotnet SDK commands? Please install dotnet SDK from: https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 Failed HRESULT returned: 0x8000ffff

Troubleshooting:

  • Confirm that the app runs locally on Kestrel. A process failure might be the result of a problem within the app. For more information, see xref:test/troubleshoot-azure-iis.

  • Examine the arguments attribute on the <aspNetCore> element in web.config to confirm that it’s either (a) .{ASSEMBLY}.dll for a framework-dependent deployment (FDD); or (b) not present, an empty string (arguments=""), or a list of the app’s arguments (arguments="{ARGUMENT_1}, {ARGUMENT_2}, ... {ARGUMENT_X}") for a self-contained deployment (SCD).

Missing .NET Core shared framework

  • Browser: HTTP Error 500.0 — ANCM In-Process Handler Load Failure

  • Application Log: Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. This most likely means the app is misconfigured, please check the versions of Microsoft.NetCore.App and Microsoft.AspNetCore.App that are targeted by the application and are installed on the machine. Could not find inprocess request handler. Captured output from invoking hostfxr: It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}’ was not found.

Failed to start application ‘/LM/W3SVC/5/ROOT’, ErrorCode ‘0x8000ffff’.

  • ASP.NET Core Module stdout Log: It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}’ was not found.

  • ASP.NET Core Module Debug Log: Failed HRESULT returned: 0x8000ffff

Troubleshooting:

For a framework-dependent deployment (FDD), confirm that the correct runtime installed on the system.

Stopped Application Pool

  • Browser: 503 Service Unavailable

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

  • ASP.NET Core Module Debug Log: The log file isn’t created.

Troubleshooting:

Confirm that the Application Pool isn’t in the Stopped state.

Sub-application includes a <handlers> section

  • Browser: HTTP Error 500.19 — Internal Server Error

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The root app’s log file is created and shows normal operation. The sub-app’s log file isn’t created.

  • ASP.NET Core Module Debug Log: The root app’s log file is created and shows normal operation. The sub-app’s log file isn’t created.

Troubleshooting:

Confirm that the sub-app’s web.config file doesn’t include a <handlers> section or that the sub-app doesn’t inherit the parent app’s handlers.

The parent app’s <system.webServer> section of web.config is placed inside of a <location> element. The xref:System.Configuration.SectionInformation.InheritInChildApplications* property is set to false to indicate that the settings specified within the <location> element aren’t inherited by apps that reside in a subdirectory of the parent app. For more information, see xref:host-and-deploy/aspnet-core-module.

stdout log path incorrect

  • Browser: The app responds normally.

  • Application Log: Could not start stdout redirection in C:Program FilesIISAsp.Net Core ModuleV2aspnetcorev2.dll. Exception message: HRESULT 0x80070005 returned at {PATH}aspnetcoremodulev2commonlibfileoutputmanager.cpp:84. Could not stop stdout redirection in C:Program FilesIISAsp.Net Core ModuleV2aspnetcorev2.dll. Exception message: HRESULT 0x80070002 returned at {PATH}. Could not start stdout redirection in {PATH}aspnetcorev2_inprocess.dll.

  • ASP.NET Core Module stdout Log: The log file isn’t created.

  • ASP.NET Core Module debug Log: Could not start stdout redirection in C:Program FilesIISAsp.Net Core ModuleV2aspnetcorev2.dll. Exception message: HRESULT 0x80070005 returned at {PATH}aspnetcoremodulev2commonlibfileoutputmanager.cpp:84. Could not stop stdout redirection in C:Program FilesIISAsp.Net Core ModuleV2aspnetcorev2.dll. Exception message: HRESULT 0x80070002 returned at {PATH}. Could not start stdout redirection in {PATH}aspnetcorev2_inprocess.dll.

Troubleshooting:

  • The stdoutLogFile path specified in the <aspNetCore> element of web.config doesn’t exist. For more information, see ASP.NET Core Module: Log creation and redirection.

  • The app pool user doesn’t have write access to the stdout log path.

Application configuration general issue

  • Browser: HTTP Error 500.0 — ANCM In-Process Handler Load Failure —OR— HTTP Error 500.30 — ANCM In-Process Start Failure

  • Application Log: Variable

  • ASP.NET Core Module stdout Log: The log file is created but empty or created with normal entries until the point of the app failing.

  • ASP.NET Core Module Debug Log: Variable

Troubleshooting:

The process failed to start, most likely due to an app configuration or programming issue.

For more information, see the following topics:

  • xref:test/troubleshoot-azure-iis
  • xref:test/troubleshoot

:::moniker-end

:::moniker range=»< aspnetcore-2.2″

This topic describes common errors and provides troubleshooting advice for specific errors when hosting ASP.NET Core apps on Azure Apps Service and IIS.

For general troubleshooting guidance, see xref:test/troubleshoot-azure-iis.

Collect the following information:

  • Browser behavior (status code and error message)
  • Application Event Log entries
    • Azure App Service: See xref:test/troubleshoot-azure-iis.
    • IIS
      1. Select Start on the Windows menu, type Event Viewer, and press Enter.
      2. After the Event Viewer opens, expand Windows Logs > Application in the sidebar.
  • ASP.NET Core Module stdout and debug log entries
    • Azure App Service: See xref:test/troubleshoot-azure-iis.
    • IIS: Follow the instructions in the Log creation and redirection and Enhanced diagnostic logs sections of the ASP.NET Core Module topic.

Compare error information to the following common errors. If a match is found, follow the troubleshooting advice.

The list of errors in this topic isn’t exhaustive. If you encounter an error not listed here, open a new issue using the Content feedback button at the bottom of this topic with detailed instructions on how to reproduce the error.

[!INCLUDEAzure App Service Preview Notice]

OS upgrade removed the 32-bit ASP.NET Core Module

Application Log: The Module DLL C:WINDOWSsystem32inetsrvaspnetcore.dll failed to load. The data is the error.

Troubleshooting:

Non-OS files in the C:WindowsSysWOW64inetsrv directory aren’t preserved during an OS upgrade. If the ASP.NET Core Module is installed prior to an OS upgrade and then any app pool is run in 32-bit mode after an OS upgrade, this issue is encountered. After an OS upgrade, repair the ASP.NET Core Module. See Install the .NET Core Hosting bundle. Select Repair when the installer is run.

Missing site extension, 32-bit (x86) and 64-bit (x64) site extensions installed, or wrong process bitness set

Applies to apps hosted by Azure App Services.

  • Browser: HTTP Error 500.0 — ANCM In-Process Handler Load Failure

  • Application Log: Invoking hostfxr to find the inprocess request handler failed without finding any native dependencies. Could not find inprocess request handler. Captured output from invoking hostfxr: It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}-preview-*’ was not found. Failed to start application ‘/LM/W3SVC/1416782824/ROOT’, ErrorCode ‘0x8000ffff’.

  • ASP.NET Core Module stdout Log: It was not possible to find any compatible framework version. The specified framework ‘Microsoft.AspNetCore.App’, version ‘{VERSION}-preview-*’ was not found.

Troubleshooting:

  • If running the app on a preview runtime, install either the 32-bit (x86) or 64-bit (x64) site extension that matches the bitness of the app and the app’s runtime version. Don’t install both extensions or multiple runtime versions of the extension.

    • ASP.NET Core {RUNTIME VERSION} (x86) Runtime
    • ASP.NET Core {RUNTIME VERSION} (x64) Runtime

    Restart the app. Wait several seconds for the app to restart.

  • If running the app on a preview runtime and both the 32-bit (x86) and 64-bit (x64) site extensions are installed, uninstall the site extension that doesn’t match the bitness of the app. After removing the site extension, restart the app. Wait several seconds for the app to restart.

  • If running the app on a preview runtime and the site extension’s bitness matches that of the app, confirm that the preview site extension’s runtime version matches the app’s runtime version.

  • Confirm that the app’s Platform in Application Settings matches the bitness of the app.

For more information, see xref:host-and-deploy/azure-apps/index#install-the-preview-site-extension.

An x86 app is deployed but the app pool isn’t enabled for 32-bit apps

  • Browser: HTTP Error 500.30 — ANCM In-Process Start Failure

  • Application Log: Application ‘/LM/W3SVC/5/ROOT’ with physical root ‘{PATH}’ hit unexpected managed exception, exception code = ‘0xe0434352’. Please check the stderr logs for more information. Application ‘/LM/W3SVC/5/ROOT’ with physical root ‘{PATH}’ failed to load clr and managed application. CLR worker thread exited prematurely

  • ASP.NET Core Module stdout Log: The log file is created but empty.

This scenario is trapped by the SDK when publishing a self-contained app. The SDK produces an error if the RID doesn’t match the platform target (for example, win10-x64 RID with <PlatformTarget>x86</PlatformTarget> in the project file).

Troubleshooting:

For an x86 framework-dependent deployment (<PlatformTarget>x86</PlatformTarget>), enable the IIS app pool for 32-bit apps. In IIS Manager, open the app pool’s Advanced Settings and set Enable 32-Bit Applications to True.

Platform conflicts with RID

  • Browser: HTTP Error 502.5 — Process Failure

  • Application Log: Application ‘MACHINE/WEBROOT/APPHOST/{ASSEMBLY}’ with physical root ‘C:{PATH}’ failed to start process with commandline ‘»C:{PATH}{ASSEMBLY}.{exe|dll}» ‘, ErrorCode = ‘0x80004005 : ff.

  • ASP.NET Core Module stdout Log: Unhandled Exception: System.BadImageFormatException: Could not load file or assembly ‘{ASSEMBLY}.dll’. An attempt was made to load a program with an incorrect format.

Troubleshooting:

  • Confirm that the app runs locally on Kestrel. A process failure might be the result of a problem within the app. For more information, see xref:test/troubleshoot-azure-iis.

  • If this exception occurs for an Azure Apps deployment when upgrading an app and deploying newer assemblies, manually delete all files from the prior deployment. Lingering incompatible assemblies can result in a System.BadImageFormatException exception when deploying an upgraded app.

URI endpoint wrong or stopped website

  • Browser: ERR_CONNECTION_REFUSED —OR— Unable to connect

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

Troubleshooting:

  • Confirm the correct URI endpoint for the app is in use. Check the bindings.

  • Confirm that the IIS website isn’t in the Stopped state.

CoreWebEngine or W3SVC server features disabled

OS Exception: The IIS 7.0 CoreWebEngine and W3SVC features must be installed to use the ASP.NET Core Module.

Troubleshooting:

Confirm that the proper role and features are enabled. See IIS Configuration.

Incorrect website physical path or app missing

  • Browser: 403 Forbidden — Access is denied —OR— 403.14 Forbidden — The Web server is configured to not list the contents of this directory.

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

Troubleshooting:

Check the IIS website Basic Settings and the physical app folder. Confirm that the app is in the folder at the IIS website Physical path.

Incorrect role, ASP.NET Core Module not installed, or incorrect permissions

  • Browser: 500.19 Internal Server Error — The requested page cannot be accessed because the related configuration data for the page is invalid. —OR— This page can’t be displayed

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

Troubleshooting:

  • Confirm that the proper role is enabled. See IIS Configuration.

  • Open Programs & Features or Apps & features and confirm that Windows Server Hosting is installed. If Windows Server Hosting isn’t present in the list of installed programs, download and install the .NET Core Hosting Bundle.

    Current .NET Core Hosting Bundle installer (direct download)

    For more information, see Install the .NET Core Hosting Bundle.

  • Make sure that the Application Pool > Process Model > Identity is set to ApplicationPoolIdentity or the custom identity has the correct permissions to access the app’s deployment folder.

  • If you uninstalled the ASP.NET Core Hosting Bundle and installed an earlier version of the hosting bundle, the applicationHost.config file doesn’t include a section for the ASP.NET Core Module. Open applicationHost.config at %windir%/System32/inetsrv/config and find the <configuration><configSections><sectionGroup name="system.webServer"> section group. If the section for the ASP.NET Core Module is missing from the section group, add the section element:

    <section name="aspNetCore" overrideModeDefault="Allow" />

    Alternatively, install the latest version of the ASP.NET Core Hosting Bundle. The latest version is backwards-compatible with supported ASP.NET Core apps.

Incorrect processPath, missing PATH variable, Hosting Bundle not installed, system/IIS not restarted, VC++ Redistributable not installed, or dotnet.exe access violation

  • Browser: HTTP Error 502.5 — Process Failure

  • Application Log: Application ‘MACHINE/WEBROOT/APPHOST/{ASSEMBLY}’ with physical root ‘C:{PATH}’ failed to start process with commandline ‘»{…}» ‘, ErrorCode = ‘0x80070002 : 0.

  • ASP.NET Core Module stdout Log: The log file is created but empty.

Troubleshooting:

  • Confirm that the app runs locally on Kestrel. A process failure might be the result of a problem within the app. For more information, see xref:test/troubleshoot-azure-iis.

  • Check the processPath attribute on the <aspNetCore> element in web.config to confirm that it’s dotnet for a framework-dependent deployment (FDD) or .{ASSEMBLY}.exe for a self-contained deployment (SCD).

  • For an FDD, dotnet.exe might not be accessible via the PATH settings. Confirm that C:Program Filesdotnet exists in the System PATH settings.

  • For an FDD, dotnet.exe might not be accessible for the user identity of the app pool. Confirm that the app pool user identity has access to the C:Program Filesdotnet directory. Confirm that there are no deny rules configured for the app pool user identity on the C:Program Filesdotnet and app directories.

  • An FDD may have been deployed and .NET Core installed without restarting IIS. Either restart the server or restart IIS by executing net stop was /y followed by net start w3svc from a command prompt.

  • An FDD may have been deployed without installing the .NET Core runtime on the hosting system. If the .NET Core runtime hasn’t been installed, run the .NET Core Hosting Bundle installer on the system.

    Current .NET Core Hosting Bundle installer (direct download)

    For more information, see Install the .NET Core Hosting Bundle.

    If a specific runtime is required, download the runtime from the .NET Downloads page and install it on the system. Complete the installation by restarting the system or restarting IIS by executing net stop was /y followed by net start w3svc from a command prompt.

Incorrect arguments of <aspNetCore> element

  • Browser: HTTP Error 502.5 — Process Failure

  • Application Log: Application ‘MACHINE/WEBROOT/APPHOST/{ASSEMBLY}’ with physical root ‘C:{PATH}’ failed to start process with commandline ‘»dotnet» .{ASSEMBLY}.dll’, ErrorCode = ‘0x80004005 : 80008081.

  • ASP.NET Core Module stdout Log: The application to execute does not exist: ‘PATH{ASSEMBLY}.dll’

Troubleshooting:

  • Confirm that the app runs locally on Kestrel. A process failure might be the result of a problem within the app. For more information, see xref:test/troubleshoot-azure-iis.

  • Examine the arguments attribute on the <aspNetCore> element in web.config to confirm that it’s either (a) .{ASSEMBLY}.dll for a framework-dependent deployment (FDD); or (b) not present, an empty string (arguments=""), or a list of the app’s arguments (arguments="{ARGUMENT_1}, {ARGUMENT_2}, ... {ARGUMENT_X}") for a self-contained deployment (SCD).

Troubleshooting:

For a framework-dependent deployment (FDD), confirm that the correct runtime installed on the system.

Stopped Application Pool

  • Browser: 503 Service Unavailable

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The log file isn’t created.

Troubleshooting:

Confirm that the Application Pool isn’t in the Stopped state.

Sub-application includes a <handlers> section

  • Browser: HTTP Error 500.19 — Internal Server Error

  • Application Log: No entry

  • ASP.NET Core Module stdout Log: The root app’s log file is created and shows normal operation. The sub-app’s log file isn’t created.

Troubleshooting:

Confirm that the sub-app’s web.config file doesn’t include a <handlers> section.

stdout log path incorrect

  • Browser: The app responds normally.

  • Application Log: Warning: Could not create stdoutLogFile ?{PATH}path_doesnt_existstdout_{PROCESS ID}_{TIMESTAMP}.log, ErrorCode = -2147024893.

  • ASP.NET Core Module stdout Log: The log file isn’t created.

Troubleshooting:

  • The stdoutLogFile path specified in the <aspNetCore> element of web.config doesn’t exist. For more information, see ASP.NET Core Module: Log creation and redirection.

  • The app pool user doesn’t have write access to the stdout log path.

Application configuration general issue

  • Browser: HTTP Error 502.5 — Process Failure

  • Application Log: Application ‘MACHINE/WEBROOT/APPHOST/{ASSEMBLY}’ with physical root ‘C:{PATH}’ created process with commandline ‘»C:{PATH}{ASSEMBLY}.{exe|dll}» ‘ but either crashed or did not respond or did not listen on the given port ‘{PORT}’, ErrorCode = ‘{ERROR CODE}’

  • ASP.NET Core Module stdout Log: The log file is created but empty.

Troubleshooting:

The process failed to start, most likely due to an app configuration or programming issue.

For more information, see the following topics:

  • xref:test/troubleshoot-azure-iis
  • xref:test/troubleshoot

:::moniker-end

You try to load your classic ASP (Active Server Pages) website and all you can see in your browser is the all too familiar display of 500 Internal Server Error.

This page isn't working

WEBSITE is currently unable to handle this request

HTTP ERROR 500

IIS HTTP Error 500 Display on Chrome browser

What is 500 Internal Server Error

First of all, the 500 Internal Server Error is a very general HTTP status code that indicates something has gone wrong on the web server without any specifics on the exact problem.

This instruction is limited to solving a 500 error on IIS server for classic ASP websites, however some other instructions that’s related to IIS in general will help for troubleshooting IIS server for .NET applications as well.

As 500 Server Error message is very often vague, the task now is to find a more specific error message that will help us further analyze and troubleshoot the issue.

Enable Debugging and Send Errors to Browser

If the website is not in a production environment, the easiest way to do it is to enable the ASP Debugging Properties and send the errors to the browser by following these steps:

  1. Launch Internet Information Services (IIS) Manager and on the left pane, select your ASP website and click on the ASP icon (Configure properties for ASP applications).

    IIS settings to configure properties for ASP applications

  2. Under the ASP window, expand the Debugging Properties and set Enable Client-side Debugging, Enable Server-side Debugging, and Send Errors To Browser to True and click Apply.

    IIS ASP Debugging Properties settings to browser

Now, when you refresh your ASP website, you will see a more descriptive error message on your browser such as the following example:

System.Xml error '80131509'

There is an error in the XML document.

/itnota/failed-page.asp, line 289

ASP 500 Error detailed failed page

With this information, you can right away open the file (e.g., itnota/failed-page.asp) and check line number 289. Again, this option is not recommended for a production website that’s still actively used and available for public since it exposes too much information publicly. The ideal way to do it is to replicate your production environment on a staging and try to reproduce the error on a lower environment.

Check IIS Log

Another way to check 500 Internal Server Error for your ASP website is by viewing IIS error logs. This is especially true if your ASP website is a public website.

Where to find the IIS Logs?

By default, the log for your website is stored on %SystemDrive%inetpublogsLogFile, but you should not use this settings for a production environment. Always set a custom path for your logs so your websites are easier to maintain in the long run. If you have a different physical hard drive for logs, even better. Make sure it’s set to Enabled.

IIS Log properties

For the sake of example, the log files are located in folder D:LogsITNota.com:

From the IIS log example below, the easiest way is to look for a pipe character (“|”) on the date and time when the error happens.

IIS Log 500 Error

The error message can be broken down into two parts:

  1. /itnota/failed-page.asp id=2087216&catId=749272

  2. |289|80131509|There_is_an_error_in_the_XML_document.

The first part indicates the problematic file with its parameters which can be reconstructed by replacing the white space with a question mark (“?”) like so:

  /itnota/failed-page.asp?id=2087216&catId=749272

The second part which starts with a pipe character (“|”) is the line number that caused the error, the error code, and the error description:

  |289|80131509|There_is_an_error_in_the_XML_document.

From the above information, we are looking at the following information:

Item Description
Filename /itnota/failed-page.asp
Line number 289
Error code 80131509
Error description There_is_an_error_in_the_XML_document.

Check the affected file by opening it in Visual Studio Code or any IDE.

If you use Visual Studio Code to read and write ASP or VBScript, click here for a way how to colorize your ASP code.

If your Internet Information Services (IIS) produces a 500 – Internal server error, your website is in serious trouble. Debugging an IIS 500 – Internal server error can take some time, so you’d better be prepared for the worst-case scenario. You don’t want to research how to deal with this error under time pressure.

Contents

  1. Cause of 500 – Internal server error
  2. Debugging an IIS 500 – Internal server error
  3. Resolving an IIS 500 – Internal server error
  4. Common 500.x substatus codes
  • Author
  • Recent Posts

Surender Kumar has more than twelve years of experience in server and network administration. His fields of interest are Windows Servers, Active Directory, PowerShell, web servers, networking, Linux, virtualization, and penetration testing. He loves writing for his blog.

Latest posts by Surender Kumar (see all)

  • Extending LVM space in Ubuntu — Thu, Feb 2 2023
  • Backup in Proxmox VE — Thu, Jan 26 2023
  • Snapshots in Proxmox VE — Wed, Jan 25 2023

In my previous posts, you learned about detailed errors and failed request tracing in IIS (Internet Information Server). I recommend reading those articles first before you proceed with this one.

Cause of 500 – Internal server error

This is the most common error you will encounter with any website hosted with IIS. In most cases, a developer messed up. Thus, the fastest way is often to simply reverse the last action taken, such as restoring an earlier version of your web application. Once your system is running again, you can investigate the cause of the error on your test side in peace.

500 Internal server error

500 Internal server error

The HTTP 500 error is a server-side error. While we understand that the problem is on the server end, the error is usually ambiguous. It doesn’t exactly tell the administrator what is wrong with the server. Thus, debugging a 500 – Internal server error often takes some time.

Debugging an IIS 500 – Internal server error

Since the above error doesn’t really tell what’s actually wrong with the server, we need to enable detailed errors, as discussed in my previous post. Once detailed errors are enabled, you will see more detailed error information, including an HTTP substatus code. Sometimes even the detailed errors don’t show any useful information right away. For example, see the following screenshot:

The page cannot be displayed because an internal server error has occurred

The page cannot be displayed because an internal server error has occurred

Here I am getting: The page cannot be displayed because an internal server error has occurred. There is no HTTP status code or substatus code listed on the error page. If you get such an error even when detailed errors are enabled, right-click anywhere in the browser window and select Inspect (or press F12).

Opening developer tools in web browser to reveal server errors

Opening developer tools in web browser to reveal server errors

This opens the developer tools in your browser window. Now, click the Console tab. The actual error thrown by the web server is displayed.

Viewing server errors using the Console tab of the web browser's developer tools

Viewing server errors using the Console tab of the web browser’s developer tools

To further understand the exact cause of 500 errors, enable Failed Request Tracing, as discussed in my previous post. Now, try to replicate the problem. If you can replicate it, open the newly generated XML log file in a web browser. The following screenshot shows the actual cause of a 500 – internal server error with a substatus code of 19 (HTTP 500.19 error):

Determining the cause of a 500 error using the Failed Request Tracing log file

Determining the cause of a 500 error using the Failed Request Tracing log file

Usually, substatus code 19 indicates that the configuration data is invalid. This could be due to some malformed or unidentified element in a server-level config file (ApplicationHost.config) or website-level config file (web.config). If you take a closer look at the ConfigExceptionInfo field of the log file, you will find the exact line number (6 in our case) in the web.config file that caused the exception. Now let’s take a look at the web.config file itself.

Viewing the problematic element in the web.config file

Viewing the problematic element in the web.config file

Here, you can see that the developer tried to add a mime type in the config file, but it was already defined in the server-level configuration file (i.e., ApplicationHost.config). Therefore, the Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.mp4’ exception was returned. Furthermore, if there is some unidentified element, a syntax error, or even a typo in the web.config file, you will most likely get a similar error.

Resolving an IIS 500 – Internal server error

To resolve an IIS 500 – Internal server error, you could simply remove the line that is causing the exception. Alternatively, if you don’t want to remove this line for some reason, add the following code right above line 6 in web.config:

<remove fileExtension=".mp4" />

By doing this, you are essentially overriding the server-level element. In the end, your web.config file should look as shown below:

Overriding the server level mime element with web.config file

Overriding the server level mime element with web.config file

Now refresh the page, and the error should go away. This was just one example of resolving a 500.19 error. If you get a 500 error with a different substatus code, use the same approach to troubleshoot the problem.

Common 500.x substatus codes

The following table covers some of the most common HTTP 500 substatus codes, along with their probable causes and troubleshooting advice:

Subscribe to 4sysops newsletter!

Status Code Probable Cause Troubleshooting Advice
500.11 The application is shutting down on the web server The application pool is shutting down. You can wait for the worker process to finish the shutdown and then try again.
500.12 The application is busy restarting on the web server This is a temporary error and should go away automatically when you refresh the page. If the error persists, something is wrong with the web application itself.
500.13 The web server is too busy This error indicates that the number of incoming concurrent requests exceeded the number that your IIS application can process. This could be caused when the performance settings are not right. To troubleshoot such issues, a memory dump needs to be captured and analyzed using tools such as Debug Diagnostic.
500.15 Direct requests for Global.asax file are not allowed A direct request was made for the Global.asa or Global.asax file, which is not allowed by the web server
500.19 The configuration data is invalid We already covered how to fix this error above
500.21 The module not recognized This status code is caused by a partial installation of the IIS server, such as missing ISAPI modules. To fix this error, identify the missing IIS components and install them.

Once you troubleshoot the problem, don’t forget to disable Failed Request Tracing and revert the detailed errors to custom errors on your web server.

I’ve just deployed an update to an existing ASP.NET MVC3 site (it was already configured) and I’m getting the IIS blue screen of death stating

HTTP Error 500.0 — Internal Server Error
The page cannot be displayed because an internal server error has occurred.

However; there is nothing showing up in the Application Event Log where I would expect to see a (more) detailed description of the entry.

How can I go about diagnosing this issue?

asked Jul 15, 2012 at 21:25

Greg B's user avatar

Greg BGreg B

1,5585 gold badges17 silver badges32 bronze badges

1

Take a look at IIS7’s Failed Request Tracing feature:

Troubleshooting Failed Requests Using Tracing in IIS 7
Troubleshoot with Failed Request Tracing

The other thing I would do is tweak your <httpErrors> setting because IIS may be swallowing an error message from further up the pipeline:

<configuration>
  <system.webServer>
    <httpErrors existingResponse="PassThrough" />
  </system.webServer>
</configuration>

If the site is written in Classic ASP then be sure to turn on the Send Errors to Browser setting in the ASP configuration feature:

enter image description here

And finally, if you’re using Internet Explorer then make sure you’ve turned off Show friendly HTTP error messages in the Advanced settings (though I suspect you’ve done that already or are using a different browser).

answered Jul 15, 2012 at 22:10

Kev's user avatar

KevKev

7,78717 gold badges79 silver badges108 bronze badges

2

In my case:

  • The Event Log was empty.
  • web.config wasn’t corrupt — verified by using same on local machine / using inetmgr

Finally…

  • Checking IIS logs showed a request like this

...Chrome/57.0.2987.133+Safari/537.36 500 19 5 312

The key being:

sc-status sc-substatus sc-win32-status
500 19 5

which with some googling pointed me to the IIS_USRS not having read permissions to the www folder

answered May 16, 2017 at 23:25

fiat's user avatar

fiatfiat

77711 silver badges16 bronze badges

1

The most obvious issue is improper or zero NTFS rights on the web application folder. So make sure the account serving the site has the right permissions. Without proper NTFS rights to the web directory it doesn’t matter what you put in the web.config as it will never be read.

A quick check can be to give everyone full rights — if the site starts working then you know it’s a rights problem and you can then set about assigning appropriate rights to a more appropriate account.

answered Sep 10, 2016 at 22:33

rism's user avatar

rismrism

3012 silver badges12 bronze badges

If upgrading from IIS6, then it may be one of the the web.config works on 6, but not in IIS 7.5 … Double click on all the icons in IIS for the website and you may get an error about the format (Section must be below other section…)

answered May 13, 2013 at 22:11

M Hall's user avatar

I had the same problem with an Azure Web App. While debugging locally, error messages (JSON) returned from ajax calls were fully returned to the browser. But once deploy to the Web App, the messages were swallowed and i was returned a default 500 error message.
So I had to explicitly set the existingResponse value to PassThrough in the web.config httpErrors tag.

Andrew Urquhart's user avatar

answered Dec 23, 2015 at 8:45

Loul G.'s user avatar

I ran in this issue many times. 500 error from a ASP.NET 4.x website. No details in the eventLog and even the tracing above didn’t help. In my case it was caused by the fact that the web.config contains rewrite rules. So check your web.config if it has something like:

<system.webServer>
  <rewrite>
    <rules>
      ...
    </rules>
  </rewrite>
</system.webServer>

If it does, you need to install iis rewrite module:

https://www.iis.net/downloads/microsoft/url-rewrite

answered Dec 1, 2021 at 10:47

Maarten Kieft's user avatar

Понравилась статья? Поделить с друзьями:
  • Asp net err ssl protocol error
  • Asp net custom error page
  • Asp net core return internal server error
  • Asp net core cors error
  • Asp net core 500 internal server error