# Exceptions not captured in ASP.NET Full Framework apps

**URL:** <https://discuss.elastic.co/t/exceptions-not-captured-in-asp-net-full-framework-apps/183759>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [May 31, 2019, 3:39pm UTC](https://discuss.elastic.co/t/exceptions-not-captured-in-asp-net-full-framework-apps/183759 "2019-05-31T15:39:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neox/32/47249_2.png) [@NeoX](https://discuss.elastic.co/u/NeoX)\
**Post date:** [May 31, 2019, 3:39pm UTC](https://discuss.elastic.co/t/exceptions-not-captured-in-asp-net-full-framework-apps/183759/1 "2019-05-31T15:39:12Z")

</div>

I'm using the [Elastic APM Agent from GitHub](https://github.com/elastic/apm-agent-dotnet) and running the [ASP.NET](http://ASP.NET) Full Framework and [ASP.NET](http://ASP.NET) Core sample apps.

If I throw an exception in the controller methods for either, it only gets registered in Kibana for the .NET Core app, and I can see that `Transaction.CaptureException` is called by `AspNetCoreDiagnosticListener.OnNext` in `Elastic.Apm.AspNetCore` to effectuate this. Where is the equivalent logic in `Elastic.Apm.AspNetFullFramework`, or is capturing exceptions in Full Framework not supported (yet)?

---

<div class="post-metadata">

**Author:** ![Sergey\_Kleyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergey_kleyman/32/39333_2.png) [@Sergey\_Kleyman](https://discuss.elastic.co/u/Sergey_Kleyman)\
**Post date:** [May 31, 2019, 7:04pm UTC](https://discuss.elastic.co/t/exceptions-not-captured-in-asp-net-full-framework-apps/183759/2 "2019-05-31T19:04:17Z")

</div>

Hi @NeoX and welcome to the forum!

You are right - at the moment mechanism automatically capturing Full Framework [ASP.NET](http://ASP.NET) transactions will not automatically capture an exception that escaped from a transaction. Of course you can still manually capture the exception by using agent's public API [`CaptureException`](https://www.elastic.co/guide/en/apm/agent/dotnet/current/public-api.html#api-transaction-capture-exception). In any case I've opened [Github issue #247](https://github.com/elastic/apm-agent-dotnet/issues/247) to resolve the problem you encountered.

---

<div class="post-metadata">

**Author:** ![NeoX](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neox/32/47249_2.png) [@NeoX](https://discuss.elastic.co/u/NeoX)\
**Post date:** [June 5, 2019, 8:01am UTC](https://discuss.elastic.co/t/exceptions-not-captured-in-asp-net-full-framework-apps/183759/3 "2019-06-05T08:01:13Z")

</div>

Thanks. The `CaptureException` method worked for me. But I'll look forward to removing this workaround once the automatic mechanism is in place.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 26, 2019, 4:01am UTC](https://discuss.elastic.co/t/exceptions-not-captured-in-asp-net-full-framework-apps/183759/4 "2019-06-26T04:01:17Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
