Using the System.Web dll isn’t the same as using System.Web. None of the System.Web pipeline will run for your ASP.NET Core application so you can’t do what you are trying to do.
More Related Contents:
- How should I inject a DbContext instance into an IHostedService?
- How can I use Dependency Injection in a .Net Core ActionFilterAttribute?
- How to consume a Scoped service from a Singleton?
- Tag helper not being processed in ASP.NET Core 2
- How do I run this code
- In C#, what is the difference between public, private, protected, and having no access modifier?
- System.MissingMethodException: Method not found?
- How can I create a dynamic button click event on a dynamic button?
- Dynamically Created Controls losing data after postback
- GridView must be placed inside a form tag with runat=”server” even after the GridView is within a form tag
- How to get client date and time in ASP.NET?
- Json.NET serialize object with root name
- Add client certificate to .NET Core HttpClient
- Passing data to Master Page in ASP.NET MVC
- Pattern for calling WCF service using async/await
- Transitive references in .Net Core 1.1
- How to turn off or handle camelCasing in JSON response ASP.NET Core?
- Get text/value from textbox after value/text changed server side
- Parse and modify a query string in .NET Core
- Asp.net core Identity successful login redirecting back to login page
- Queuing in OneWay WCF Messages using Windows Service and SQL Server
- Custom Authentication in ASP.Net-Core
- How to add OpenIdConnect via IdentityServer4 to ASP.NET Core ServerSide Blazor web app?
- Run a background task from a controller action in ASP.NET Core
- ASP.NET 5 add WCF service reference
- When `PostAuthenticateRequest` gets execute?
- Could not load file or assembly ‘Microsoft.ReportViewer.Common, Version=11.0.0.0
- Encrypting Web.Config
- File permissions on Linux/Unix with .NET Core
- ASP.NET Core 1.1 runs fine locally but when publishing to Azure says “An error occurred while starting the application.”