I have successfully deployed a .net core web API on Heroku, but the app fails to launch. When I attempt to run the app, I get the error below: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Here is the connection string my .net core code
"ConnectionStrings": {
"DromiContext": "User=user;Password=password;Host=host;Port=5432;Database=database;Integrated Security=true;Pooling=true;"
}
Related Question Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
The app was not configured to run migration automatically. After it was updated
`
using (var serviceScope = services.BuildServiceProvider().GetService<IServiceScopeFactory>().CreateScope())
{
var context = serviceScope.ServiceProvider.GetRequiredService<DromiContext>();
context.Database.Migrate();
}
`
The error disappeared