asp.net web api - MiniProfiler with Web.API 2; is there a global magic request context object? -
I am trying to set up a miniprofile on my Web API site, and I followed the guidelines at miniprofiler.com, and the following is global. Ax: This uses the default, which stores the actual code in When I when I request one of my web API URLs: I opened the code, and I used my own I spend a few hours, t find a practical solution: I am at a loss, what exactly do I want to do. I understood the process of putting together the question I had to configure the web. My filter was adjusted to change when configured, and using MiniProfiler.Current to work.
protected zero application_Start () {MiniProfilerEF6.Initialize (); // Other setup} Safe void Application_BeginRequest () {// UI MiniProfiler.Start () is required to be started here to present; } Secure Zero application_EndRequest () {MiniProfiler.Stop (); }
HttpContext.Current.Items .
miniprofiler Current , this
HTTCPN.NET Current .
creates the application_BuyRequest profile, Code> HttpContext.Current
IActionFilter ,
HttpContext. Current in HttpContext.Current
MiniProfiler.Current.Step ("Administrator: Action") failed Gets
MiniProfiler.Current , which is the
HTTP Consort. Current , which is no longer valid
Application_EndRequest fire, and
httpctx The current is magically back, and so it wrappers the profiler and tells me when this request has started
IProfileProvider I can create, store more reliable programmer objects than
HttpContext.Current , but I do not know where it can be.
IProfileProvider is a global variable; Either all worker threads in the MVC or Web API pipeline will have to use the same
IProfileProvider
IProfileProvider is global in the entire app; If I ask it to store the profile in HttpContext A, then any request for other HTTC Contexts is going to pollute the profile
InRequestScope because
InRequestScope Web API does not work with 2.1, but even if I
httpexquest message Properties New
HTTPPTC.Internet ITEMS , but still,
IProfileProvider is a global variable and I have no way of ensuring that each request is being viewed on their version
HttpRequestMessage
MiniProfiler.Current can be called from anywhere, so I think the global
IProfileProvider will have to inspect the call stack and there
HttpRequestMessage Need to find? It seems like madness.
HttpContext.Current When you are waiting for Async / things:
Miniprofiler.
Comments
Post a Comment