RaygunClient instance for .net and unique user tracking

TK123

Posted on
Aug 07 2015

Hello,

I set up Raygun on my .net mvc project, however I am not able to access the User and UserInfo properties. I'm using .net 4.5.1, vs2013, and this is a .net mvc 5 project.

I installed the Mindscape mvc nuget package on my appliation, and it added the core one. I set up the web.config and created a test exception, that works fine and I can see the error in the dashboard.

I setup an instance of RaygunClient in my login method, however when I do the following I get compiler errors:

var raygunClient = new RayGunClient();

raygunClient.User = "testUser";

Visual studio responds that "User" doesn't exist on raygunClient. Same error for ".UserInfo".

I also tried setting up the raygunClient as a private readonly in the global.asax, but that didn't work either.

Thanks,

TK


Jason Fauchelle

Raygun

Posted on
Aug 07 2015

Hi TK,

If you change the 'G' in RaygunClient to lower case, does that fix your issue? If you've setting up the Raygun Http Module in web.config, make sure you provide your RaygunClient instance to the module so that your options such as UserInfo get used when reporting unhandled exceptions. Here are the docs regarding this: https://raygun.io/docs/languages/net/asp#raygun-client

Hope that helps, let me know if you have further questions.

-Jason Fauchelle


Reply