If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Startup Routines

Overview

Aptify has added the ability for customers to inject arbitrary code into the startup cycle of their instance of services. This can be useful to initialize configurations ahead of time, like populating server-side caches before they are used or changing some aspect of the .NET stack.

How can I use it

Implement the interface ISecondaryStartupRoutine from the assembly StartupRoutine.dll and place your assembly into the bin directory. Services will automatically execute your routine during application startup. Startup routines are executed after dependency injection installers.

How does Aptify use Startup Routines

We use it to add or remove features from services that are needed for one product but not another. For example, Aptify Web has many hard coded end points to support the Javascript framework. The RecordName controller is an example of one of these endpoints. e-Business applications do not need this endpoint, and exposing it could prevent a security risk. This endpoint is now stood up through a startup routine. The Aptify Web instance of services has this assembly in its bin directory which ensures it gets executed. e-Business does not.

All of our installers implement the interface IStartupRoutine. Customers should implement ISecondaryStartupRoutine. The framework ensures that all ISecondaryStartupRoutine implementations execute after all IStartupRoutine implementations.

 

Copyright © 2014-2019 Aptify - Confidential and Proprietary