Aras Innovator Platform

Aras Innovator Runs on .NET Core

All server components run on .NET 6.0.

.NET 6.0 is an open-source, cross-platform framework that runs on Windows, macOS, and Linux operating systems. It is a successor of .NET Framework and was written from scratch to make it modular, lightweight, and fast.

Despite of being a successor of .NET Framework, .NET Core and .NET 5+ do not provide full feature parity and brings various breaking changes that developers must understand when implementing new server-side code or migrating existing one:

  • New web framework
  • Aras Innovator has been migrated from classic ASP.NET web framework to run on ASP.NET Core - an open-source and cross-platform framework for building modern web applications with the aim to provide the access to modern features, better development experience and greater performance.

  • Aras Innovator now uses Kestrel as a primary web server – lightweight cross-platform web server for ASP.NET Core applications. When installed via MSI package, IIS is used only as a reverse proxy while still being configured via web.config. To learn more about IIS hosting configuration please visit ASP.NET Core Module article.
  • Unsupported API and breaking changes
  • There are number of APIs and technologies are not yet ported to .NET Core and .NET 5+, considered as deprecated (thus no longer supported on a target platform and throws “Unsupported” exception at runtime), have breaking changes in functionality behavior, or are completely removed.Please see the following official Microsoft documentation about the differences between .NET Framework and .NET 6.0:

  • Assembly Redirection

In prior releases, when developing a server method that calls custom DLL that references different version of a DLL that is also used by the Innovator, there is a chance to receive runtime errors due to an assembly version mismatch. To address this, assembly binding instructions must be added to the web.config file to instruct the runtime to properly load an assembly. In .NET Core and .NET 5+ there is no longer such concept of binding redirections so no changes in web.config are needed. Aras Innovator will automatically pick up and load an assembly from application binaries folder.

Despite of being cross-platform and providing high-level abstractions for low-level APIs, some .NET Core and .NET 5+ API still may work differently depending on a current platform it is running on. It is necessary for developers to know and understand these differences to be sure that the application works identically on all supported platforms:

  • Working with native code
  • .NET provides mechanisms to call native code via Platform Invoke.
  • There might be an existing code that uses P\Invoke to call Windows-specific API (e.g.via kernel32.dll), and since it is not present on Linux, the code will not work when running in Linux.To avoid compatibility issues, it is better to use available .NET Core and .NET 5+ functionality or 3rd-party libraries that provide cross-platform capabilities.
  • If different libraries need to be loaded or APIs called depending on a current OS, consider decorating the code with platform-specific blocks:

    if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
    {
     // Call Windows-specific API
    }
    else
    {
     // Call Linux-specific API
    } 

    Follow the link to find more about native interoperability: Native interoperability - .NET

  • OS-specific APIs
  • .NET Core and .NET 5+ exposes several APIs that might not be available for the given platform. Such APIs throw PlatformNotSupportedExceptionwhen called from an unsupported OS. For instance, Process.MainWindowHandle throws the exception on Linux and macOS. Make sure you do not use one of these APIs if you plan to run the Innovator on multiple platforms. Follow the link to find more about unsupported APIs: APIs that always throw exceptions on .NET Core and .NET 5+

  • File system case-sensitivity
  • Windows uses a case-insensitife file system allowing to access files regardless of path casing, so a single file or folder can be accessed by paths written in different cases, e.g. c:\Innovator\Aras.Server.exe is equal toc:\INNOVATOR\aras.server.EXE

    Unlike Windows, the Linux file system is case-sensitive, meaning that two paths with different casing will point to a two different files\directories, e.g.

    /app/bin/Aras.Server.exe is not equal to/app/bin/Aras.server.EXE

    During development, make sure that all paths in code match corresponding entities on file system to avoid any issues when running Aras Innovator on Linux.

  • Filesystem path delimiter
  • In Windows, it is allowed to use both slash (‘/’) and backslash (‘\’) as a path delimiter as they cannot be part of file\folder name, so the next two paths are equal:

    c:\Innovator\Aras.Server.exe is equal toc:/INNOVATOR/aras.server.EXE

    On Linux, because the backslash is a valid file name character, the only allowed path delimiter is slash (‘/’) so

    /app/Innovator/Aras.Server.exe is not equal to/app/Innovator\Aras.server.EXE

    To avoid any issues with accessing file system, it is strongly recommended to avoid building paths manually, and use special .NET API instead to build platform-specific file path:

    Path.Combine()
    Path.Join()
    Path.DirectorySeparatorChar

    Example: CallingPath.Join(Directory.GetCurrentDirectory(), “data”);will produce the following results: On Windows: “C:\Innovator\data On Linux: “/app/Innovator/data

  • Cultures and string comparison
  • .NET exposes CultureInfo API to work with different cultures. This API is platform-dependent and may work differently on different platforms: Windows and Linux do not use identical lists of cultures. In Windows it is part of the installation while Linux relies on data from International Components of Unicode (ICU). Another difference is that certain cultures may not be installed on a particular OS. String comparison with the use of InvariantCulture and CurrentCulture settings works differently on Windows and Linux. To avoid cross-platform issues, it is highly recommended to specify string comparison/culture explicitly and follow Best Practices for Comparing Strings in .NET

  • Date and time formatting
  • Date and Time .NET API may return date and time in a different format depending on the current OS and its regional settings. For instance, calling DateTime.Now.ToString();will produce the following results: On Windows: 05/21/2021 2:22:55 PM On Linux: 05/21/2021 15:22:55

  • It is recommended to explicitly set culture or date/time format to avoid the differences between the date format on Linux and Windows.
  • Timezones
  • .NET provides an API to work with time zones via TimeZoneInfo. Depending on a platform, the result of calling this API will be different: Windows maintains its own list of timezones while Linux uses IANA time zones. These formats are not identical and might have different names for the same time zone. For instance, the result of calling TimeZoneInfo.Local will be as follows:
  • On Windows: (UTC+03:00) Minsk On Linux:(UTC+03:00) GMT+03:00

  • Please note that the Innovator has a custom implementation for mapping between these formats. It always expects that the time zone name is provided in the Windows format and transforms it to IANA name when TimeZoneInfo API is needed on non-Windows platform. In addition, the time zone name on Aras Innovator Client is always converted to the Windows format from IANA.
  • Line ending

Line endings vary by OS. Windows uses carriage return and line feed ("\n”) as a line ending while UNIX-based OSes use just line feed ("\n”). In .NET calling Environment.NewLine will also return different values depending on a current OS. On Windows:

Environment.NewLine => “\n”;

On Linux:

Environment.NewLine => “\n”;