expressappframework-405323-app-shell-and-base-infrastructure-application-life-cycle-blazor-application-life-cycle.md
The following table outlines the main stages in the life cycle of an XAF Blazor application:
| Stage | Description |
|---|---|
| Host Startup | The application host starts. At this stage, the system does not create any XAF Application instances, does not access the database, and does not initialize the application model. |
| Web API Initialization | If the application includes a Web API service, the system creates an application instance to build the entity data model (EDM) and initialize singleton services such as ITypesInfo. This instance is destroyed after initialization. |
WarmUpApplication class instance with customization limited to the builder.AddBuildStep method. |
| User Connects to the Server | The system establishes a SignalR hub connection. The ProxyHubConnectionHandler initializes the ValueManager storage container for the user session.ProxyHubConnectionHandler in the Startup.cs file. Refer to the following help topic for more information: Azure Deployment. |
| Creation of Circuit | The CircuitHandlerProxy initializes required circuit services.ICircuitHandler and register it in the SolutionName.Blazor.Server\Startup.cs file:services.TryAddEnumerable(ServiceDescriptor.Scoped<ICircuitHandler,CircuitHandlerCustomizer>()); |
| Logon Form Display | The system creates an application instance for the logon form. After authentication, this instance is destroyed and the system creates a new application instance for the authenticated user.GetStartupActions method to modify the default form creation process or display custom startup Views as described in the following KB article: How to show a specific View at application startup, right after the logon window or after loading the main window |
| Circuit Closed | The circuit is closed. |
| Application Disposed | The application instance is disposed when the Blazor application is closed (for instance, the browser or a tab is closed). If the client disconnects unexpectedly, the server waits one minute for reconnection. If the application client does not respond, the application is disposed. |Important
See Also
ASP.NET Core Razor component lifecycle
Underlying Controls and Components Behind UI Elements (ASP.NET Core Blazor)