I have an Asp.Net app, using .net 4.6.1 version. When I installed Sentry nuget and used Sentry SDK, nothing working, no events are being sent to Sentry. Below is global.asax configs where I tried this Sentry.
<%@ Application Language="C#" %>
<%@ Import Namespace="Sentry" %>
<%@ Import Namespace="Sentry.AspNet" %>
<%@ Import Namespace="Sentry.Extensibility" %>
<script runat="server">
private IDisposable _sentry;
protected void Application_Start()
{
_sentry = SentrySdk.Init(o =>
{
o.Dsn = "dsn url";
});
// Initialize Sentry to capture AppDomain unhandled exceptions and more.
}
// Global error catcher
protected void Application_Error()
{
var exception = Server.GetLastError();
SentrySdk.CaptureException(exception);
}
protected void Application_End()
{
if (_sentry != null)
_sentry.Dispose();
}
</script>
Can anyone help me? Thanks