Reputation: 14088
Hello I am trying to setup ELMAH with Sitecore, I have read this http://newguid.net/sitecore/2011/using-elmah-for-error-logging-within-sitecore/#t-recent and it solution is working fine with some error from my point of view. 1. ELMAH skip store 404 to store in log in all cases + 2. Sitecore not processing 404 error in case if URL contain "." char. For example http://mysite/wrongurl redirect me to 404.html but http://mysite/wrongurl.dfgd show to me Server Error in Application (IIS 7.5)(not my 404.html) this is my settings just releted to ELMAH and processing errors
<configSections>
<sectionGroup name="elmah">
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/>
</sectionGroup>
</configSections>
<elmah>
<!-- NetKeyElmah inside of App_Config\ConnectionStrings.config -->
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="ElmahData" />
</elmah>
<sitecore>
<settings>
<setting name="ItemNotFoundUrl" value="/404.html" />
<setting name="LayoutNotFoundUrl" value="/404.html" />
<setting name="LinkItemNotFoundUrl" value="/sitecore/service/notfound.aspx" />
<setting name="IgnoreUrlPrefixes" value="/sitecore/admin/elmah.axd|/sitecore/default.aspx" />
</settings>
</sitecore>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
</modules>
<handlers>
<add name="Elmah" path="/sitecore/admin/elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
<system.web>
<customErrors mode="On" defaultRedirect="/errorpage.html" >
<error statusCode="404" redirect="/404.html" />
<error statusCode="500" redirect="/500.html" />
</customErrors>
</system.web>
How to setup finish my setup in correct way.
Upvotes: 0
Views: 602
Reputation: 530
In response to 2.
By default, IIS will not process every type of file. If you want IIS or Sitecore to process a given file type that it doesnt recognize you need to specify that in the web.config. Update the following two sections in your web.config to include the file types that you want Sitecore to process:
<param desc="Allowed extensions (comma separated)">aspx, ashx, asmx, asp</param>
and
<param desc="Allowed extensions (comma separated)">aspx,asp</param>
In these sections you would add the file extensions that are currently throwing errors and this will make Sitecore process your file type.
Upvotes: 3