step1. 安裝elmah 套件網址如下
https://code.google.com/p/elmah/
step2.ASP.NET 專案中選擇安裝 ELMAH on XML Log 這個 NuGet 套件
http://www.nuget.org/packages/elmah.xml
PM> Install-Package elmah.xml
step3.預設會將所有收集到的錯誤儲存成 XML 格式並置於專案的 ~\App_Data\Elmah.Errors 目錄下。
打開web.config
找到 <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/Elmah.Errors" /> 註解掉
step4.
將以下這段
<!--<modules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
...