raygun4net icon indicating copy to clipboard operation
raygun4net copied to clipboard

RaygunClient.SendInBackground() does not set Version to AssemblyVersion in ASP.NET

Open essizershinn opened this issue 7 years ago • 1 comments

It appears that RaygunClient.SendInBackground() cannot get the AssemblyVersion in ASP.NET because it calls RaygunClient.BuildMessage() from a ThreadPool queued work item so HttpContext.Current is null when RaygunMessageBuilder.SetVersion(string) looks at it.

Repro Steps

  1. Create an instance of RaygunClient without an explicit ApplicationVersion (either in config or set in code).
  2. Call RaygunClient.SendInBackground(...) from within an ASP.NET application.

Expected Behavior

  • Version is set to AssemblyVersion

Actual Behavior

  • Version is set to Not Supplied

Configuration

  • Raygun4Net4 v5.2
  • .NET 4.6.1 Full Framework / WebApi 2.2 or MVC 5
  • Windows 10 Creators Update (1703) / IIS 10.0.15063.0

essizershinn avatar Jul 20 '17 18:07 essizershinn

Hi essizershinn

Thanks for reporting this issue. We'll take a look at resolving this for the next version of Raygun4Net.

QuantumNightmare avatar Jul 20 '17 21:07 QuantumNightmare

This should no longer be an issue, if no app version is provided it will roll back to assembly version.

phillip-haydon avatar Mar 13 '24 02:03 phillip-haydon