I am using asp.net 4 and C # as a solution to the registration error. I am using ELMAH 1.2 .
I was able to correctly use ELMAH on my local computer using CASSINI in Visual Studio 2010, but as soon as I transfer the website to the server with IIS 7 or IIS 7.5 (locally or remotely). ELMAH cannot record any errors. Errors or yellow pages are not displayed.
I assume that there is some problem with the configurations, even I read a lot of tutorials that I still can not get to work on the production environment. Here is my Web.Config. Could you tell me what I am doing wrong?
NOTES: I deleted the connection string here for security, but at work cassini is excellent Thanks
<?xml version="1.0"?> <configuration> <configSections> <section name="myWebAppSettings" type="System.Configuration.SingleTagSectionHandler"/> <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> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules> <add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" /> </modules> <handlers> <add name="Elmah" path="Admin/elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" /> </handlers> <directoryBrowse enabled="false"/> <httpErrors errorMode="Custom"> <remove statusCode="404" subStatusCode="-1"/> <remove statusCode="500" subStatusCode="-1"/> <error statusCode="404" path="/ErrorPages/404.aspx" prefixLanguageFilePath="" responseMode="ExecuteURL"/> <error statusCode="500" path="/ErrorPages/Error.aspx" prefixLanguageFilePath="" responseMode="ExecuteURL"/> </httpErrors> </system.webServer> <connectionStrings> </connectionStrings> <elmah> <security allowRemoteAccess="1" /> <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="XXXXX" /> </elmah> <location path="Admin"> <system.web> <authorization> <allow roles="CMS-ADMINISTRATOR"/> <deny users="*"/> </authorization> </system.web> </location> <system.web> <httpHandlers> <add verb="POST,GET,HEAD" path="Admin/elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /> </httpHandlers> <httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/> </httpModules> <customErrors mode="Off"></customErrors> <globalization culture="en" uiCulture="en"/> </pages> <compilation debug="true" defaultLanguage="c#" targetFramework="4.0"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="WebProject.Core"/> <add assembly="WebProject.DataAccess"/> <add assembly="WebProject.Cms"/> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Data.Services.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Login.aspx" timeout="2880"/> </authentication> <roleManager enabled="true" cacheRolesInCookie="true"> <providers> <clear/> <add connectionStringName="XXXXX" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> </providers> </roleManager> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" connectionStringName="XXXXX" applicationName="/" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="16" minRequiredNonalphanumericCharacters="4" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/> </providers> </membership> </system.web> </configuration>