asp.net – 找不到元素’elmah’的架构信息

我读了这里已经发布的所有答案但似乎没有解决.
即使我收到了警告,Elmah也能完美地工作.当我在visual studio 2012中启动debug(f5)时,我也遇到了这些错误.在构建时一切都很好.

web.config中的配置部分很简单,所以我真的不知道如何解决它:

<configuration>
  <configSections>
    <sectionGroup name="elmah">
      <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler,Elmah" />
      <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler,Elmah" />
      <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler,Elmah" />
      <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler,Elmah" />
    </sectionGroup>
  </configSections>

  <elmah>
    <security allowRemoteAccess="1" />
    <errorLog type="Elmah.sqlErrorLog,Elmah" connectionStringName="EvaConnection" />
    <!--<errorLog type="Elmah.XmlFileErrorLog,Elmah" logPath="~/App_Data/ErrorLogs" />-->
    <!-- ELMAH class ErrorMailModule.cs has been modified to read config from AppSettings -->
    <errorMail from="dummy@dummy.com" to="dummy@dummy.com" subject="dummy" priority="High" async="true" smtpPort="25" smtpServer="dummy" useSsl="false" userName="dummy@dummy.com" password="dummy" noYsod="false" />
  </elmah>

解决方法

我认为这个错误与您选择sqlErrorLog作为errorLog类型的事实有关.您是否在数据库中运行了为您的EvaConnection connectionString配置的 Elmah SQL Server DB Script?如果没有,则需要执行此操作,以便为Elamh创建正确的表和存储过程,以便在将错误写入数据库时​​使用.

如果您使用的是sql Server的更高版本而不是2005,请参阅ErrorLog Implementation – Enterprise-Level Relational Databases wiki页面中的注释,以获取有关ntext字段类型的说明.

更新:

在更加关注这个问题之后.在ELMAH Google Group – Could not find schema information上找到相关帖子这是Visual Studio报告有关ELMAH配置部分的问题,因为它没有支持的.xsd文件.有一个可用的文件可用于在Visual Studio禁止错误/警告消息.只需按照Issue 239: Intellisense for web.config and external config files的说明操作即可

相关文章

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