I need to get the website ID associated in IIS web server.
I need to know this in my injected C# helper functions . The C# helper functions are being injected from C++ profiler dll. I will get lots of requests to my profiler.. I need to find out the request's application ID.
How can i get that.? I got to know a way by using
System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteID()
but it is getting crashed on using with some random functions(not able to identify the reason for crash). Is there any way to get the site id .?