Question: I am configuring this application
[Confirming the account and recovering passwords in ASP.NET Core](https://learn.microsoft.com/es-es/aspnet/core/security/authentication/accconfirm?view=aspnetcore-2.2&tabs=visual-studio)
but I have an error:

> 
> HTTP Error 500.30 - ANCM In-Process Start Failure Common causes of
>  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 to debugger to the application process and inspect http 500
>  when replacing this code in IdentityHostingStartup
> 
> 
> 

Below is my configuration:

```
[assembly: HostingStartup(typeof(Misioneros.Stella.Maris.Web.Areas.Identity.IdentityHostingStartup))]
namespace Misioneros.Stella.Maris.Web.Areas.Identity
{
    public class IdentityHostingStartup : IHostingStartup
    {
        public void Configure(IWebHostBuilder builder)
        {
            builder.ConfigureServices((context, services) => {
                services.AddDbContext<ApplicationDbContext>(options =>
                    options.UseSqlServer(
                        context.Configuration.GetConnectionString("DefaultConnection")));

                services.AddDefaultIdentity<IdentityUser>(config =>
                {
                    config.SignIn.RequireConfirmedEmail = true;
                })
                    .AddEntityFrameworkStores<ApplicationDbContext>();
            });
        }
    }
}

```

Any idea what is the problem?

Answer: 
I had this error come up. It turned out the root was because the app I was working with used Azure Key Vault, and [I was using the wrong identity to authenticate with Azure.](https://danschnau.com/blog/change_visual_studio_azure_identity)

I had to go to **Tools > Options > Azure Service Authentication** and change the identity used for Azure service authentication.

[![enter image description here](https://i.stack.imgur.com/Nvwwx.png)](https://i.stack.imgur.com/Nvwwx.png)
I received this problem after visual studio updating at version 16.4.1, I resolved it with changing a package reference in `cs.proj`:

from
`PackageReference Include="Microsoft.AspNetCore" Version="2.2.0"`

to `PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0"`

[![enter image description here](https://i.stack.imgur.com/i655J.png)](https://i.stack.imgur.com/i655J.png)