title: ASP.NET CORE 3.0 - HTTP Error 502.5 - Process Failure
body: <p>After spending the past 3 days trying to resolve that problem, so I ask for your help.  I already went to many related questions from stackoverflow, except that they are different .Net Core version.</p>
  
  <p>I recently upgraded my website from ASP.NET CORE 2.2 to ASP.NET CORE 3.0 but now I keep receiving <code>HTTP Error 502.5 - Process Failure</code> on the website.  You can see the page at <a href="http://www.esnapup.com" rel="nofollow noreferrer">http://www.esnapup.com</a>.</p>
  
  <p>Here is how the Startup.cs looks like:</p>
  
  <pre><code>public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
      }
  
      public IConfiguration Configuration { get; }
  
      // This method gets called by the runtime. Use this method to add services to the container.
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddAuthentication(IISServerDefaults.AuthenticationScheme);
          services.AddDbContext&lt;AppDbContext&gt;();
          services.AddTransient&lt;IProductRepository, ProductRepository&gt;();
          services.AddTransient&lt;ICategoryRepository, CategoryRepository&gt;();
          services.AddTransient&lt;IFeedRepository, FeedRepository&gt;();
          services.Configure&lt;CookiePolicyOptions&gt;(options =&gt;
          {
              // This lambda determines whether user consent for non-essential cookies is needed for a given request.
              options.CheckConsentNeeded = context =&gt; true;
              options.MinimumSameSitePolicy = SameSiteMode.None;
          });
  
          services.AddDistributedMemoryCache();
  
          services.AddSession(options =&gt;
          {
              // Set a short timeout for easy testing.
              options.IdleTimeout = TimeSpan.FromSeconds(10);
              options.Cookie.HttpOnly = true;
              // Make the session cookie essential
              options.Cookie.IsEssential = true;
  
          });
          MvcOptions mvcOptions = new MvcOptions();
          mvcOptions.EnableEndpointRouting = false;
          services.AddMvc();
          services.AddRazorPages();
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
      {
          if (env.EnvironmentName == "Development")
          {
              app.UseDeveloperExceptionPage();
              app.UseStatusCodePages();
          }
          else
          {
              app.UseExceptionHandler("/Home/Error");
              //app.UseExceptionHandler("/Raffaello/Index");
              // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
              app.UseHsts();
          }
  
          //app.UseHttpsRedirection();
  
          app.UseStaticFiles();
          app.UseSession();
          //app.UseCookiePolicy();
          app.UseRouting();
          app.UseAuthentication();
          app.UseEndpoints(routes =&gt;
          {
              routes.MapControllerRoute(
              name: "Details",
              pattern: "{controller}/{Details}/{id?}",
                new { controller = "Product", action = "Details" },
                new { id = @"w+" });
              routes.MapControllerRoute(
               name: "Detail",
                pattern: "{controller}/{index}/{Detail}/{id?}",
                new { controller = "Product", action = "Detail", level = "index" },
                new { id = @"w+" });
              routes.MapControllerRoute(
                name: "default",
                pattern: "{controller=Home}/{action=Index}/{id?}");
              routes.MapRazorPages();
  
          });
          //app.UseSitemapMiddleware();
      }
  </code></pre>
  
  <p>The Program.cs page looks like below:</p>
  
  <pre><code>using Microsoft.AspNetCore.Hosting;
  using Microsoft.Extensions.Hosting;
  
  namespace SnapupMVC
     {
  public class Program
  {
      public static void Main(string[] args)
      {
          CreateHostBuilder(args).Build().Run();
      }
  
      public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
  Host.CreateDefaultBuilder(args)
      .ConfigureWebHostDefaults(webBuilder =&gt;
      {
          webBuilder.UseSetting(
                  WebHostDefaults.PreventHostingStartupKey, "true")
              .UseStartup&lt;Startup&gt;();
      });
  }
  }
  </code></pre>
  
  <p>Here's my .csproj codes:</p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="utf-8"?&gt;
     &lt;Project ToolsVersion="Current" 
       xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
      &lt;PropertyGroup&gt;
  </code></pre>
  
  <p>600
      True
      False
      False
      MvcControllerEmptyScaffolder
      root/Controller
      1440
      False
      CustomProfile
      
      true
    
  </p>
  
  <p>Please help me resolve the problem.</p>
  
  <p>Thanks</p>