감사하지 않음을 느낀다.
나는 그것을 수동으로 끝내었다.
처음으로 맞춤 웹 이벤트를 설정합니다. 예 :
// WCF method
public int Sync()
{
try
{
// do normal stuff
}
catch (Exception ex)
{
var e = new SyncError("Error in Sync", ex);
e.Raise();
throw;
}
}
마지막으로 Web.config의 수정 :
<eventMappings>
<add name="Sync Errors" type="SyncLibrary.SyncError, SyncLibrary"/>
</eventMappings>
<rules>
<add name="Sync Errors SQL" eventName="Sync Errors"
provider="SqlWebEventProvider"
profile="Default"
minInstances="1"
maxLimit="Infinite"
minInterval="00:00:00" />
</rules>
참고 :
public class SyncError : WebBaseErrorEvent
{
public SyncError(string message, Exception e)
: base(message, "Sync", WebEventCodes.WebExtendedBase + 1, 0, e)
{
}
public override void FormatCustomEventDetails(WebEventFormatter formatter)
{
base.FormatCustomEventDetails(formatter);
formatter.AppendLine(ErrorException.ToString());
}
}
다음이 좋아 사용이 당신이 건강 모니터링이 켜져 있다고 가정합니다.
감사합니다. leppie! 내가 오늘 그것을 구현하게하고 내가 너를 알릴 것이다! 건배, 후안 – Intrigue
아저씨 elsharpo, 당신은 그것을 알려주시겠습니까 ?? 감사 – Kiquenet