Dash App deployed on IIS with live updates show POST 500 Internal Server Error errors for _dash-update-component

Hello,
I’m trying to deploy a live update python dash app on IIS.

If I run the python script manually, I get a graph that updates every interval with new data points.

However, if I host it on the IIS, the graph is not updated at all.

This is my app script:

app = Flask(name)

dash_app = dash.Dash(name, server=app)

dash_app.layout = html.Div(
[
dcc.Graph(id=‘live-graph’, animate=False),
dcc.Interval(
id=‘graph-update’,
interval=3*1000, #sec * 1000
n_intervals = 0
),
]
)

@dash_app.callback(Output(‘live-graph’, ‘figure’),
[Input(‘graph-update’, ‘n_intervals’)])
def update_graph_scatter(n):

My web.config file looks like this:

<?xml version="1.0" encoding="utf-8"?>