blazor-workshop icon indicating copy to clipboard operation
blazor-workshop copied to clipboard

HTTP Error 500.30 - ANCM In-Process Start Failur

Open nguyentuycuong opened this issue 5 years ago • 4 comments

When I host in IIS, I got an error below. How to resolve it?

HTTP Error 500.30 - ANCM In-Process Start Failure Common solutions to this issue: The application failed to start The application started but then stopped The application started but threw an exception during startup Troubleshooting steps: Check the system event log for error messages Enable logging the application process' stdout messages Attach a debugger to the application process and inspect For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265

And this is a message error in Event Viewer

Application '/LM/W3SVC/5/ROOT' with physical root 'D:\Project\Demo\Publish' failed to load coreclr. Exception message: CLR worker thread exited prematurely

nguyentuycuong avatar May 31 '20 07:05 nguyentuycuong

I'm too

PS: Sorry, it's did't work, becose WEBSITE_LOAD_CERTIFICATES parameter not setted.

AlecSK avatar Jun 10 '20 08:06 AlecSK

i have face this same issue.. how to fix it.. kindly tell me how i fix it. in my case the loges are printed Couldn't find a valid certificate with subject 'CN=BlazingPizzaCertificate' on the 'CurrentUser\My'

mudasir-alp77 avatar Mar 29 '21 12:03 mudasir-alp77

@nguyentuycuong @AlecSK @mudasir-alp77 The BlazingPizza.Server project uses IdentityServer for authentication users. As part of the IdentityServer configuration - its needs a certificate to sign the tokens. In development mode, Identity Server allows you to not use a certificate but just use a key called Development. This can be seen in appsettings.Development.json file. Here is the code:

{
  "Logging": {
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
    }
  },
  "IdentityServer": {
    "Key": {
      "Type": "Development"
    }
  }
}

When you use Visual Studio and run the application, VS sets an environment variable named "ASPNETCORE_ENVIRONMENT" to Development. If you do the deployment to your server other than a local development - you will need to make sure to provide a valid certificate to Identity Server. Take a look at this article from @csharpfritz - https://devblogs.microsoft.com/aspnet/asp-net-core-authentication-with-identityserver4/. Read through section Adding IdentityServer4. That explains how to provide a certificate for signing the tokens.

Hope this helps.

lohithgn avatar Apr 16 '21 10:04 lohithgn