2
我試圖讓Elmah使用ServiceStack作爲基本路由引擎運行。有什麼辦法忽略與ServiceStack的某一路線,所以我可以去'/elmah.axd',或者我可能錯過了另一個選項嗎?ServiceStack:如何忽略路線?
在web.config中
<handlers>
<add path="*" name="ServiceStack.Factory" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" />
<add path="elmah.axd" name="Elmah" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" />
</handlers>
注:我已經在日誌工廠配置
LogManager.LogFactory = new ElmahLogFactory(new NLogFactory());
這可能是一個解決方案 - http://stackoverflow.com/questions/13269227/how-to-ignore-a-route-with-self-hosted-servicestack –