mvc affected users not working for me
tack
Posted on
Apr 27 2015
i have the following and exceptions are being logged, but i'm not getting affected users on the ragun site mvc controller useless if do a _raygun.Send(ex) (ie not when the default exception is logged);
[HttpGet]
public ActionResult Index(string token)
{
_raygun.UserInfo.Email = "tack@gmail.com";
_raygun.UserInfo.FullName = "tack";
_raygun.UserInfo.Identifier= "168";
throw new NotImplementedException();
}
Global.asax.cs private static readonly RaygunClient _raygunClient = new RaygunClient(); public static RaygunClient GenerateRaygunClient() { return _raygunClient; }
Jason Fauchelle
Raygun
Posted on
Apr 28 2015
Hello Tack,
Thanks for contacting us about this. Are you setting up the automatic Raygun exception reporting using the http module in Web.Config? If so, the module uses its own instance of RaygunClient which would be why changes to your RaygunClient instance don't show up.
Fortunately, there is a way for you to provide your RaygunClient instance to the http module which is explained in this documentation: https://raygun.io/docs/languages/net/asp#raygun-client
By doing this, the http module will use your RaygunClient instance to send automatically detected exceptions, and so will use any options that you set on the RaygunClient instance such as user information.
Please let me know if you have further questions about this and I'll help you out.
-Jason Fauchelle