asp.net – 使用主题的css文件需要在页面上的头控件 (例如)

我正在开发asp.net网站项目。当我运行项目时,它正常工作。但在服务器中,我收到以下错误。如何解决这个问题?
Using themed css files requires a header control on the page. (e.g. `<head runat="server" />`).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. How to solve this problem?

Exception Details: system.invalidOperationException: Using themed css files requires a header control on the page. (e.g. `<head runat="server" />`).

Source Error:

An unhandled exception was generated during the execution of the current web request. information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).]
   System.Web.UI.PageTheme.SetStyleSheet() +2458406
   System.Web.UI.Page.OnInit(EventArgs e) +8699420
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterasyncPoint) +378

解决方法

对于我来说,因为我上传之前的 pre-compile站点,所以在实时服务器上的原因是丢失了precompiledApp.config文件

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....