In this case, I'm trying to launch area controller as startup and want to make areas controller wait until layout controller is ready with session variables set on Sql Server.
current routing on startup.cs
- app.UseMvc(routes =>
- {
- routes.MapRoute(
- name: "area",
- template: "{area:exists}/{controller=Area1Home}/{action=Index}/{id?}");
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
- });
Also, how can I make a make an area controller dependent on layout controller so that the application doesn't throw an error because session variables are not available to area controllers to load data? Or
Is there a way to make area controller wait until the home controller is loaded?

Replies
Know the answer? Post it — somebody with the same question will find it here.