'How to use Server.ScriptTimeout in ASP.NET Core 5 (migration from .NET framework to .NET 5)

Thanks for reading my post.

enter image description here

Originally, I was using ASP.NET MVC on the .NET framework, but I want to migrate to .NET 5.

However, this line of code:

filterContext.Controller.ControllerContext.HttpContext.Server.ScriptTimeout = TimeoutSeconds;

is not working in .NET 5 - how to solve that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source