无法加载类型 'System.UI.Page' 配置错误

Could not load type 'System.UI.Page' Configuration Error

我试图在 ASP.NET MVC 应用程序的文件夹中显示 ASP.NET Web 表单页面时收到此错误。我是否缺少程序集参考或程序包?

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load type 'System.UI.Page'.

Source Error:


Line 324:        </mobileControls>
Line 325:
Line 326:        <pages pageBaseType="System.UI.Page" userControlBaseType="System.UI.UserControl">
Line 327:            <namespaces>
Line 328:                <add namespace="System" />


Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config    Line: 326

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212 

Page 不在 System.UI 中。它在 System.Web.UI 命名空间中,在 System.Web 程序集中。默认情况下,您应该引用 System.Web,因此只需修复 web.config 中的完全限定名称。 UserControl class.

也是如此
<pages pageBaseType="System.Web.UI.Page" userControlBaseType="System.Web.UI.UserControl">