0
votes

I have a free account in Azure. I created a simple project without database and published in Azure and it is running fine in Azure

But after that I created another project with database and I published the following way

  • select project->publish->appservice->create new.
  • select create profile. Then I give Appservice name
  • create sqldatabase - I given the database server name , Administrator user name and admin password , - click ok
  • finally I clicked create button to create Azure sqlDatabase, SQL server, App Service, then it has created Appservice successfully
  • after creating the Appservice,I given the database defaultconnection ticked to use this connection string at run time, then i clicked save button.
  • After that I clicked Publish button and then when it try run the published file the following error message is being showed.

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

1

1 Answers

0
votes

I was calling a function SeedData from program.cs file to create the master file before start the application. But after commenting out it is working fine.

 public static void Main(string[] args)
{
    var host = CreateHostBuilder(args).Build();
    using (var scope = host.Services.CreateScope())
    {
        var services = scope.ServiceProvider;
        var context = services.GetRequiredService<MvcProj3_1Context>();
        SeedData(context);
    }
    host.Run();
    CreateHostBuilder(args).Build().Run();
}