ASP.Net Session Info
jlippold
Posted on
Mar 28 2014
Session values always returns not provided in my asp .net 2.0 app. Everything else is being caught. Is there a way to manually add session via raygunClient.Send()
I know the session info is there, because my custom logger reads the info fine,
foreach (void strName_loopVariable in ctx.Session.Contents) {
strName = strName_loopVariable;
if (ctx.Session.Contents(strName) is string | ctx.Session.Contents(strName) is int) {
errorDetails.AppendLine("* " + strName + ": " + ctx.Session.Contents(strName).toString() + "");
} else {
errorDetails.AppendLine("* " + strName + ": Object");
}
}
I know I can send custom objects like this
raygunClient.Send(Server.GetLastError(), new List<string>(), mdDict)
But is there anyway to override Session?
John-Daniel Trask
Raygun
Posted on
Mar 28 2014
We currently don't do any special handling for Session in Raygun4NET, so the best strategy would be to iterate over the keys and add them and the associated value to a dictionary (mdDict) then pass that in as the third parameter as you have it.
Also note that Raygun4NET targets .NET 3.5 and while this runs on the .NET 2.0 CLR, our library uses 3.5 assemblies (Linq among others), so any server you deploy your site to will also need the 3.5 assemblies installed (just in case you were developing this locally and had the later .NET releases installed, but had yet to deploy it live - don't want to bring your site down!)
Regards,
Callum Gavin
Mindscape Limited