In Web Player on Linux, IronPython script fails with error "Could not add reference to assembly System.Web.Extensions"

In Web Player on Linux, IronPython script fails with error "Could not add reference to assembly System.Web.Extensions"

book

Article ID: KB0070298

calendar_today

Updated On:

Products Versions
Spotfire Web Player All supported versions

Description

The following error is thrown when an IronPython script attempts to reference the System.Web.Extensions assembly while running in a Spotfire Web Player that is hosted on Linux: 

"Could not execute script '...' Could not add reference to assembly System.Web.Extensions"

Environment

Linux Operating System

Resolution

Resolution:

1. Host the Web Player on a Windows server, or
2. Refactor your IronPython script to use different libraries or Python modules that are available on Linux.

Explanation:

System.Web.Extensions are closely tied to ASP.NET and Windows environments, which are incompatible with Spotfire Web Player running on Linux. Instead, consider libraries compatible with .NET 6 or .NET Core for cross-platform functionality.

Issue/Introduction

This article suggests ways to avoid an error received when an IronPython script attempts to reference the System.Web.Extensions assembly while running in a Spotfire Web Player hosted on Linux: "Could not execute script '...' Could not add reference to assembly System.Web.Extensions"

Additional Information

1. Stackoverflow: How to Add System.Web.Extensions Assembly to .NET Core Project in VSCode

 https://stackoverflow.com/questions/45687851/how-to-add-system-web-extensions-assembly-to-net-core-project-in-vscode 

2. RealPython: Python Data Serialization Guide

https://realpython.com/python-serialize-data/