Closed q812143836 closed 1 year ago
Can you confirm that the App_DispatcherUnhandledException callback has ServiceCloud.Instance.User populated? If it's not, then it will fall back to the authenticated user on the http context / windows account.
Do you have a small sample app I can use to run the above snippets, or could you update our sample apps with this code. I just need an easy way to test this.
您能否确认 App_DispatcherUnhandledException 回调已填充 ServiceCloud.Instance.User?如果不是,那么它将回退到 http 上下文/windows 帐户上的经过身份验证的用户。
你有我可以用来运行上述代码片段的小示例应用程序吗,或者你可以用这段代码更新我们的示例应用程序吗?我只需要一种简单的方法来测试它。
I just need to comment out this line of code to receive all the extra information
You should call Register which automatically registers up to the dispatcher exception handlers. You don't need to call Startup. Also, you can set a global user on the exceptionless client, I'd recommend this for desktop client.
@q812143836 does this help? I wouldn't wire up App_DispatcherUnhandledException as we already do that. I would probably add a custom plugin to set the user .SetUserIdentity(ServiceCloud.Instance.User?.UserId.ToString(), ServiceCloud.Instance.User?.UserName)
I'm closing this as the two previous comments address this issue specifically. The issue is happening because our unhandled event handlers don't set user information. I'd recommend setting user identity in a plugin in this case. Please let us know if you have any questions.
I submitted two error logs and set UserIdentity and Source But the UserIdentity and Source received by the server are only useful in the Try block. It does not take effect in global exception events Is this my problem?
Below is a screenshot of the log I received
Logs submitted by App_DispatcherUnhandledException event I don't receive UserIdentity and SetSource So what should I do to make the log submitted by the: App_DispatcherUnhandledException event include UserIdentity and SetSource? grateful!