help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Upgrading to AxCMS.net ver7.2.0

 

AxCMS.Service

In AxCMS.net 7.2.0 we have introduced AxCMS.Service. The goal of AxCMS.Service is to provide unified way for executing tasks in background for both AxCMS.net and custom projects. In AxCMS.net, AxCMS.Service replaces AxIndexService, NewsletterSyndicationService and AxBackgroundExecutor.

AxCMS.Service has to be installed
After running DB change scripts (to create AxServiceTask table and standard AxCMS.net tasks), you have to install AxCMS.Service by going to AxCMS.Service folder of AxCMS.net installation and executing register.bat.

AxIndexService is deleted
After you upgrade to 7.2.0, you will no longer need AxIndexService. You can uninstall it from your system by running following command:
%WINDIR%\Microsoft.NET\Framework\v2.0.50727\installutil AxCMS.IndexService.exe /U

AxIndexQueue is deleted
AxIndexQueue and AxIndexQueueItem classes are deleted. You have to delete all usages of them from your code. Your Create application is probably using AxIndexQueue to index the contents in foreground. It was done this way for the case when you don't have IndexService installed. Since AxCMS.Service is required for all AxCMS.net systems, you can remove indexing from Create application. Make sure you also delete AxIndexQueue from the call to DeleteTables in DeleteAll method,

AxNewsletterService is deleted
After you upgrade to 7.2.0, you will no longer need NewsletterSyndicationService. You can uninstall it from your system by executing unregister.bat from NewsletterSyndicationService folder.

AxBackgroundExecutor is deleted
If you have explicitly used AxBackgroundExecutor, you have to change your code to schedule service tasks.
Replace

AxBackgroundExecutor.Default.Schedule(elements, myCmsActivity, new AxBackgroundExecutor.QueueWatcher());

with

foreach (IClassifiable element in elements)
ServiceTask.Schedule(myCmsActivity, element);

Configuration

Here is a sample config file for AxCMS.Service:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section
name="exceptionManagement"
type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectionHandler, Microsoft.ApplicationBlocks.ExceptionManagement" />
<section
name="ServiceInstances"
type="Axinom.AECMS.ServiceTasks.ServiceInstancesConfiguration, AxCMS.BL" />
</configSections>

<appSettings>
<add key="SmtpServer" value="mail.axcms.net" />
</appSettings>

<exceptionManagement>
<publisher
mode="off"
assembly="Axinom.Framework"
type="Axinom.Framework.Exception.ExceptionPublisherMail"
Operator="
mail@axcms.net" />
<publisher
mode="off"
assembly="Axinom.Framework"
type="Axinom.Framework.Exception.ExceptionPublisherFile"
File="C:\TMP\exception.txt" />
</exceptionManagement>

<ServiceInstances>
<ServiceInstance name="AxCMSweb_MS">
<Context path="/AxCMSweb" site="Default Web Site"/>
<Settings threadCount="10" sleepTime="10" errorSleepTime="60" />
</ServiceInstance>
<ServiceInstance name="AxCMSweb_LS">
<Context path="/AxCMSwebLive" site="Default Web Site"/>
<Settings threadCount="10" sleepTime="10" errorSleepTime="60" />
</ServiceInstance>
</ServiceInstances>

</configuration>

If you need configuration for a prod system with website, your ServiceInstance must look like this:

<ServiceInstance name="Sample_MS">
<Context path="/" site="SAMPLE - cms.sample.de"/>
<Settings threadCount="10" sleepTime="10" errorSleepTime="60" />
</ServiceInstance>

path = The virtual path to the configuration file. If you have no virtual directory add a "/" there.
site = The name of the application Web site, as displayed in IIS configuration.

 

Link tracking

To be able to use the new feature link tracking, assure that there is an attribute "track" allowed in HTML attributes and that this attribute is then allowed for link tag "a" in HTML tags in management system.

You can log the click on the links when adding AxTrackedLinkAction in web.config of live system:

<AxActionLog>
    <action class="Axinom.AECMS.Logging.AxTrackedLinkAction" mode="on" />
</AxActionLog>

If something is wrong while redirecting the user is automatically redirected to homepage. There are exceptions that are thrown when e.g. given redirect parameter is wrong. The type of those exceptions is "InValidParameterException". It is also thrown when activeid parameter was wrong.

If you don't want to get those exceptions, exclude them from exceptionmanager in web.config:

<publisher
   mode="on"
   assembly="Axinom.Framework"
   type="Axinom.Framework.Exception.ExceptionPublisherMail"
   exclude="+Axinom.AECMS.InValidParameterException,AxCMS.BL"
   Operator="mail@axcms.net" />

If parameters are fine but link e.g. could not be found in DB, then there is an exception thrown of type "RedirectException". You can also exclude that if you like.