Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

.Net profiler - Stamping Requests with GUID in HttpContext.Current.Items

$
0
0
Hi,

In my helper function ( C#) , I need to assign and store the guid for each request when the call is from entry point of request.

So I was storing in the context items as  - "HttpContext.Current.Items["GUID"]" by cheching if HttpContext.Current is not 'null' . So that i can access it from  other helper functions to differentiate between the requests. This GUID from helper function will be sent to native function to log the call w.r.t the requests.

But i found that accessing the HttpContext current object is causing more overhead upto 50% for a million calls.  

Is there any other way to store the GUID which can be accessed through out the request ? 

Thanks & Regards,

./Selva

Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>