문제

누구나 통합되어 있습니다 엘마 그들의 SharePoint 환경으로?

나는 그것이 모든 asp.net이기 때문에 가능하다고 생각하지만, 누군가가 그것을했는지, 그리고 그것을 달성하는 방법에 대한 걸음이 있는지 궁금했습니다.

도움이 되었습니까?

해결책

우리는 Moss 2007 환경에서 Elmah를 사용합니다. Elmah는 httphandlers를 사용하고 Web.config를 통해 설정되기 때문에 활성화는 멍청했습니다. SharePoint 내부에서 실행중인 응용 프로그램을 위해 Elmah 물건을 web.config에 추가하십시오.

Elmah가 사용자 정의 응용 프로그램보다 높은 레벨에서 오류를보고하려면 SharePoint Web.config에 추가하십시오.

다른 팁

SharePoint에서 Elmah 또는 대부분의 httpmodules를 설정할 때 중요한 것은 HTTPModules 섹션의 시작 부분에 있어야한다는 것입니다. 그렇지 않으면 SharePoint는 본질적으로 예외를 삼키면 Elmah 기능이 호출되지 않습니다.

공장

<clear />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>  
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
<add name="SPRequest" type="Microsoft.SharePoint.ApplicationRuntime.SPRequestModule, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
     ... Rest of SharePoint modules....

작동하지 않습니다

<clear />
<add name="SPRequest" type="Microsoft.SharePoint.ApplicationRuntime.SPRequestModule, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
     ... Rest of SharePoint modules....
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>  
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>

마법은 없습니다. 다른 ASP.NET 사이트에서처럼 연결하십시오.

다음은 SharePoint 웹 응용 프로그램의 web.config에 추가 해야하는 구성 항목입니다.

구성 아래에 추가하십시오

 <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>

ConnectionString 섹션을 추가하십시오

<connectionStrings>
 <add name="elmah-express" connectionString="Data Source=[server name];Initial Catalog=  [ELMAH_customlogging];User ID=testuser;Password=Welcome1;" />

</connectionStrings>

ConnectionString 섹션 바로 아래에 Elmah 섹션을 추가하십시오

<elmah>

  <security allowRemoteAccess="0" />

  <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="elmah-express" />
</elmah>

httphandlers 및 httpmodules system.web에 핸들러 및 모듈 항목 추가

  <httpHandlers>

      <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>

   </httpHandlers>

   <httpModules>

      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
    </httpModules>

System.webserver의 핸들러 및 모듈 섹션에 핸들러 및 모듈 항목 추가

    <modules runAllManagedModulesForAllRequests="true">

    <remove name="ErrorLog"/>

     <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />

     <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />

     <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />

     <add name="ErrorTweet" type="Elmah.ErrorTweetModule, Elmah" preCondition="managedHandler" />
     </modules>

     <handlers>

     <add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />

     </handlers>

SharePoint의 Elmah 구현은 아래 링크를 참조하십시오

http://sidteche.blogspot.in/2014/08/implement-elmah-custom-logging-in.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top