Last post Jan 25, 2015 03:08 PM by tolga42
Apr 18, 2013 01:38 PM|johnkwaters|LINK
I am using the new WebTools 2012.2, and the help files says to add config.EnableSystemDiagnosticsTracing to your Global.asax.
However, this method doesnt exist on HttpConfiguration.
Apr 19, 2013 06:51 AM|DarrellNorton|LINK
You are missing a reference to the new assembly. If you create a new WebApi project the reference will be added automatically.
If you have an existing project, make sure in your solution packages folder you have the following (or get it from nuget):
Then add a reference to the System.Web.Http.Tracing.dll that is in that nuget package folder. Then you will be able to type:
Update: The reason it does not show up until you add the reference is it is an extension method. Microsoft did not actually change the HttpConfiguration object for this feature.
Apr 20, 2013 06:48 PM|johnkwaters|LINK
So, when I donwload that Nuget package, I dont actually get a Microsoft.AspNet.WebApi.Tracing DLL. I can see that I have the package, but in the pakage lib I have System.Web.Http.Tracing.dll, and it still doesnt work...
Mar 31, 2014 06:24 PM|AaronLShumaker|LINK
I also have System.Web.Http.Tracing.dll reference and System.Web.Http.GlobalConfiguration.Configuration.EnableSystemDiagnosticsTracing(); is not found
Mar 31, 2014 06:32 PM|AaronLShumaker|LINK
I figured it out. Because it is an extension method, you need a using statement where the extension method is declared. So in your Global.asax.cs or whereever you want to call
EnableSystemDiagnosticsTracing(), you need to add this at the top:
Jan 25, 2015 03:08 PM|tolga42|LINK
AaronL! Adding "using System.Web.Http;" fixed it.