Visual Basic ASP.NET App Not Reporting Errors #2230
-
We're working on adding Sentry to one of our legacy ASP.NET VB applications (using .NET 4.8) and so far it seems to be working OK (HTTP request timings are being sent), however when we attempt to send errors nothing comes over. We also looked through the Sentry debug and it seems that the error capture isn't firing at all. Below is the code we have for our Global.asax.vb file: Imports System
Imports System.Web
Imports Sentry
Imports Sentry.AspNet
Imports Sentry.Extensibility
Public Class MvcApplication
Inherits HttpApplication
Private _sentry As IDisposable
Protected Sub Application_Start()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
_sentry = SentrySdk.Init(Function(o)
o.Dsn = "https://[email protected]/1"
o.TracesSampleRate = 1.0
o.AddAspNet()
o.SendDefaultPii = True
o.Debug = True
End Function)
End Sub
Protected Sub Application_Error()
Server.CaptureLastError()
End Sub
Protected Sub Application_BeginRequest()
Context.StartSentryTransaction()
End Sub
Protected Sub Application_EndRequest()
Context.FinishSentryTransaction()
End Sub
Protected Sub Application_End()
_sentry?.Dispose()
End Sub
End Class We also tried: SentrySdk.CaptureException(Server.GetLastError) and that didn't seem to work either. Any assistance would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Answered by
mattjohnsonpint
Mar 13, 2023
Replies: 1 comment
-
Transfered to #2232 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mattjohnsonpint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Transfered to #2232