asp.net core app deployed on iis meets 500 internal server error

后端 未结 10 1825
别那么骄傲
别那么骄傲 2020-12-09 14:29

:( Oops. 500 Internal Server Error An error occurred while starting the application.

This message came out when I added database fu

相关标签:
10条回答
  • 2020-12-09 14:57

    I had similar issue after istalling dotnetcore-windowshosting using chocolatey while doing AWS ec2 instance bootstrapping.

    When I checked my IIS modules AspNetCoreModule was missing.

    This solved my issue. https://github.com/aspnet/IISIntegration/issues/434

    I had to uninstall chocolatey package, restart machine and install it again.

    Hope this helps!

    0 讨论(0)
  • 2020-12-09 14:58

    In my case, I got this because I hadn't actually installed the latest 'DotNetCore.2.0.0-WindowsHosting.exe' on the windows server I was running it on... so it was working fine on my local machine in debug and error five hundy'ing on the server.

    I had other non trivial to fix issues with the upgrade also... I'd advise avoiding it if you can.

    0 讨论(0)
  • 2020-12-09 15:03

    Mark333's comment below solved my problem.

    Quoting for easy reading:

    "I'm using the normal publish provided by Visual Studio. And, I just found out using the latest version of Hosting Bundle will fix the issue. +1 on this microsoft.com/net/download/dotnet-core/runtime-2.1.0-rc1"

    I had to install for 1.1 since my app is a little older, but Hosting Bundle fixed it. In my case we deploy to a Docker image for our official environment, but when I want to do some testing locally I publish it and let my local IIS serve it up.

    0 讨论(0)
  • 2020-12-09 15:03

    I had the same issue.

    My problem was that my connection string to db was not set in appsettings.production.json

    And the internal server error 500 was to vague error message.

    Changing the stdoutLogEnabled = true did nothing to me so i was not seeing any information about the error.

    0 讨论(0)
  • 2020-12-09 15:05

    My problem was solved installing .netcore latest: https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.2-windows-hosting-bundle-installer

    https://docs.microsoft.com/pt-br/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-2.2#install-the-net-core-hosting-bundle

    Worked like a charm!

    0 讨论(0)
  • 2020-12-09 15:08

    I had installed DotNetCore.2.0.5-WindowsHosting.exe on a Windows 2008 R2 Standard machine and encountered the same http 500 error. Logging didn't help (blank logs were generated - and Event Viewer logs were the generic ErrorCode = 0x80070002)

    I had to do two things to solve my problem:

    1. Give Read rights to the ApplicationPoolIdentity user (EG: IIS APPPOOL\AppPoolIdentityName) to the website directory and the application directory
    2. I had to install IIS ASP Core under Server Manager (this felt weird, but it worked!)
    0 讨论(0)
提交回复
热议问题