我已经阅读了这里所有已发布的答案,但似乎没有一个能解决我的问题。 即使我收到了这些警告,Elmah仍然可以正常工作。当我在Visual Studio 2012中启动调试(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>
<xs:schema xmlns:tns="http://Elmah.Configuration" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://Elmah.Configuration" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://Elmah.Configuration">
。 - Suncat2000