Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

2 DBContext conflict on the Azure server

$
0
0

Hi All,

I have 2 DbContext on startup.cs , one is for Identity and other is other table access. On my local it is fine but when i deploy to Azure following is displayed

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

My Startup code

  public void ConfigureServices(IServiceCollection services)
        {
            services.AddDbContext<ApplicationDbContext>(options =>
                options.UseSqlServer(
                    Configuration.GetConnectionString("GlobalometerDBContext")));
            services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
                .AddEntityFrameworkStores<ApplicationDbContext>();


            services.AddDbContext<GOMLIB.Models.GlobalometerDBContext>(options => options.UseSqlServer(Configuration.GetConnectionString("GlobalometerDBContext")));


            services.AddMvc();
            //services.AddControllersWithViews();
            services.AddRazorPages();
        }

Thanks for the help

Thanks,

Shabbir


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>