Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find schema information for the element 'elmah'

I read all the answers already posted here but none seems to solve. Elmah is working flawlessly even if I got those warnings. Also I got those errors when I launch debug (f5) in visual studio 2012. On build everything is fine.

Config section in web.config is straightforward so I really don't know how to solve it:

<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="[email protected]" to="[email protected]" subject="dummy" priority="High" async="true" smtpPort="25" smtpServer="dummy" useSsl="false" userName="[email protected]" password="dummy" noYsod="false" />
  </elmah>
like image 897
Manight Avatar asked Dec 17 '12 12:12

Manight


1 Answers

I think this error is related to the fact that you have selected SqlErrorLog as your errorLog type. Did you run the Elmah SQL Server DB Script in the database that your EvaConnection connectionString is configured for? If not, you will need to do this, so that the correct tables and stored procedures are created for Elamh to use when writing errors to the database.

If you are using a later version of SQL Server than 2005, please see the note in the ErrorLog Implementation - Enterprise-Level Relational Databases wiki page for a note about the ntext field type.

Update:

After paying more attention to the question. Found a relevant post on the ELMAH Google Group - Could not find schema information This is an issue that Visual Studio reports about the ELMAH config section because it does not have a supporting .xsd file. There is a file available that can be used to suppress this error/warning message in Visual Studio. Just following the instructions from Issue 239: Intellisense for web.config and external config files

like image 57
Paige Cook Avatar answered Sep 28 '22 00:09

Paige Cook