XIA Automation

Migrating XIA Automation Server to .NET 4

This is a workaround to an issue in XIA Automation Server v3. XIA Automation Server v4 targets .NET Framework 4.8 automatically.

XIA Automation Server v3 was designed and built for .NET 3.5.1. Generally this does not cause any issues, however, when using the latest versions of the Offline 365 modules, you may find that the following error occurs:

Could not load file or assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModule.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Ensure you have a backup

Before proceeding ensure that you have a full system backup.

Enable ASP.NET 4

Ensure that the .NET Extensibitility 4.5 and ASP.NET 4.5 role features are installed

Change the XIAAutomation Application Pool

Modify the XIAAutomation application pool to target the .NET Framework v4

Update the web.config file

Backup the web.config file in by default the following location and replace with the text below
C:\Program Files\CENTREL Solutions\XIA Automation Server\Server
<?xml version="1.0"?>
      Default XIA Automation Server Web.Config file
      WARNING: Incorrect modification of this file may cause your XIA Automation Server software to fail.
    <trace autoflush="true">
            Uncomment the following line to enable Tracing from startup. This is not required normally as this can be enabled from the GUI once the application is running.
            The directory "app_data\logs\trace" must exist for the trace file to be created.
            <add name="TextTracer" type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" initializeData="app_data\logs\trace\xiaautomation.log"/>
    <globalization enableClientBasedCulture="true" uiCulture="auto" culture="auto"/>
        The maxRequestLength in kilobytes determines the maximum file size that can be sent to XIA Automation
        The executionTimeout sets the length of time that the system can process requests.
    <httpRuntime maxRequestLength="102400" executionTimeout="3600"/>
        <add assembly="Xceed.Zip, Version=4.0.9175.12420, Culture=neutral, PublicKeyToken=BA83FF368B7563C6"/>
        <add assembly="Xceed.FileSystem, Version=4.0.9175.12420, Culture=neutral, PublicKeyToken=BA83FF368B7563C6"/>
        <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Security, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.DirectoryServices, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <authentication mode="Windows"/>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
      <compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/d:TRACE" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
        <providerOption name="CompilerVersion" value="v4.0"/>
        <providerOption name="WarnAsError" value="false"/>
    <!-- For IIS7 and above when uploading files over 3Mb in size the following setting must also be modified as well as the httpRuntime maxRequestLength setting -->
          <requestLimits maxAllowedContentLength="3500000"/>