Azure Migration issue with Aspose.Cells

We are in the process of migrating our .net web app which uses Aspose.Cells to azure. While running the code assessment using azure migrate, we get the “Windows local system usage detected” at " ```
System.Object Microsoft.Win32.RegistryKey::GetValue(System.String)" in the Aspose.Cell.dll. How do we remediate this issue? Can we migrate to azure with this issue?

@deepaspose

When migrating your .NET web application that uses Aspose.Cells to Azure, encountering the “Windows local system usage detected” warning during the code assessment indicates that your application is trying to access system resources that may not be available in the Azure environment. Specifically, this warning is related to the use of the Microsoft.Win32.RegistryKey::GetValue method, which accesses the Windows registry.

To remediate this issue, consider the following steps:

  1. Review Dependencies: Check if your application or any of its dependencies are relying on the Windows registry for configuration or settings. If possible, refactor your code to avoid such dependencies.

  2. Use Azure-Compatible Alternatives: Instead of accessing the registry, consider using Azure App Configuration or Azure Key Vault for storing configuration settings and secrets. This approach is more suitable for cloud environments.

  3. Run Under Full Trust: If your application requires certain functionalities that necessitate full trust, you can configure your Azure service to run under Full Trust. This may allow access to some system resources, but be cautious as it may not resolve all issues related to registry access.

  4. Testing: After making changes, thoroughly test your application in the Azure environment to ensure that it functions correctly without relying on local system resources.

  5. Documentation Review: Review the Aspose documentation for any specific guidelines regarding the use of Aspose.Cells in Azure environments. This may provide additional insights or best practices.

By addressing these points, you should be able to mitigate the warning and successfully migrate your application to Azure. If you continue to face issues, consider reaching out to Aspose support for more tailored assistance.

Sources:
[1]: Windows Azure Platform|Aspose.Words for .NET - Aspose Documentation

We are using Aspose.Cells to read from Excel and Export to Excel functionalities. Is it possible to perform these functionalities without accessing the Windows registry? How to prevent the Aspose.Cells.dll from trying to access the Windows registry?

@deepaspose
The Windows version of the package will depend on the underlying Windows libraries. If you want to not rely on Windows underlying libraries, please use .NET6 version. Regarding how to use the .NET6 version, please refer to the following document.

@John.He Our application is on .Net Framework 4.8. Is it possible to use Aspose.Cells .Net6 for .Net 4.8?

@deepaspose,

Using a DLL compiled for .NET 6.0 in a .NET Framework 4.8 application is not straightforward and generally is not supported. The reason is .NET Framework and .NET Core/.NET 5+/6+ have different runtime implementations and APIs, which make cross-compatibility clash between these versions.

@amjad.sahi Is there a workaround to use Aspose.Cells in .Net 4.8 without accessing the windows local system features and registry? 'Cos this is preventing us from migrating our application to Azure.

@deepaspose

  1. Please confirm Target Platform Settings.
  2. Could you please try to migrate a simple project without Aspose.Cells to Azure if it works?

And, we will try to construct a testing environment to test this issue. Thank you for your patience.