加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

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

发布时间:2020-12-16 04:33:02 所属栏目:asp.Net 来源:网络整理
导读:我读了这里已经发布的所有答案但似乎没有解决. 即使我收到了警告,Elmah也能完美地工作.当我在visual studio 2012中启动debug(f5)时,我也遇到了这些错误.在构建时一切都很好. web.config中的配置部分很简单,所以我真的不知道如何解决它: configuration confi
我读了这里已经发布的所有答案但似乎没有解决.
即使我收到了警告,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的说明操作即可

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读