Updating Asp.Net Applications with AppLife Update

Asp.Net Updating Actions

The Kjs.AppLife.Update.Web.Actions.dll assembly includes the following update actions that you can use in updating Asp.Net applications.

 

Update Rollback Notification Action

The Update Rollback Notification action creates and writes the completion notification for update processes that do not complete successfully. The notification is unique to the update controller instance that initiated the update.  This action should be the first action in an update that will be applied by the Asp.Net Web Update control.

 

During the Execute stage of the update process, this action communicates with the web process, receiving the execution id of the update process, as well as the notification directory to place the notification.  This information is then placed into the Shared Property collection for use by the Update Success Notification action.

 

If an update fails and is rolled back, this action will be the last action to execute its rollback process.  In the Rollback stage, a notification is created and written indicating that the update failed and was rolled back.

 

Update Success Notification Action

The Update Success Notification action creates and writes the completion notification for update processes that complete successfully. The notification is unique to the update controller instance that initiated the update.  This action should be the last action in an update that will be applied by the Asp.Net Web Update control.

 

During the Execute stage of the update process, this action will write the completion notice indicating that the update completed successfully. 

 

If an update fails and is rolled back, this action will not be executed, and the completion notification will be written by the Update Rollback Notification action when the rollback stage ends.

 

Site Offline Action

The Site Offline action will place a app_offline.htm file in the root of the web site.  This action can be placed before performing updating work to ensure that the site is offline to visitors during the updating process.

 

Web root path

This is the local server path of the web root directory.  When using the WebUpdatePostbackDisplay, the Application Directory will represent the web root.  When using an admin utility, the web root can be set relative to the application directory (which would be the physical path of the utility application), or an Explicit Path can be defined as well.

 

The explicit path and the sub directory  values support the use of Shared Properties.  Any shared property used in the value will be expanded as the update is executed.  Shared properties can be added delineated by $’s.  (e.g $MyRootPath$ ).

 

Custom app_offline.htm

A customized htm file can be packaged into the update when the update is built.  To include a custom app offline html page, set this value to the location of the htm file on the update build machine.  This value is optional.  If an file is defined, it must be present, or the action will be invalid and an update cannot be built.

 

Site Online Action

The Site Online action will remove an app_offline.htm file in the root of the web site.  This action can be placed after the updating work is performed, ensuring that the site is available to visitors when the update is completed.

Web root path

This is the local server path of the web root directory.  When using the WebUpdatePostbackDisplay, the Application Directory will represent the web root.  When using an admin utility, the web root can be set relative to the application directory (which would be the physical path of the utility application), or an Explicit Path can be defined as well.

 

The explicit path and the sub directory  values support the use of Shared Properties.  Any shared property used in the value will be expanded as the update is executed.  Shared properties can be added delineated by $’s.  (e.g $MyRootPath$ ).

 

Start IIS Web Site Action

The Start IIS Web Site action will perform a start operation on the designated web site within IIS.

 

IgnoreFailure

When true, a failure to start the site is ignored and the update will continue.  The action uses the site description, or Server Comment, to find the web site in IIS.

 

SiteName

This is the name or description of the web site on the IIS server.  When the action executed, a site with this name on the server running the update is located.  If a site is found, the site is started.  When the action is rolled back, if a site was started during the execute phase, it is stopped.

 

Stop IIS Web Site Action

The Stop IIS Web Site action will perform a stop operation on the designated web site within IIS.

 

IgnoreFailure

When true, a failure to stop the site is ignored and the update will continue.  The action uses the site description, or Server Comment, to find the web site in IIS.  This value can be changed and is not guaranteed to be unique.  Furthermore, many updates will still succeed even if the site is not stopped.

 

SiteName

This is the name or description of the web site on the IIS server.  When the action executed, a site with this name on the server running the update is located.  If a site is found, the site is stopped.  When the action is rolled back, if a site was stopped, it is restarted.

 

Database Updating Actions

Most Asp.Net applications have one or more databases as part of the solution and maintaining databases during an application update is a vital step in the process.  AppLife Update supports updating databases.  The solution lab exploring updating deployed client-server applications covers updating SQL databases in detail, and includes a collection of custom SQL Server updating actions that you can use during an Asp.Net application update.

Visit the solution lab here

Download database actions here