I have declared the PreApplicationStartMethodAttribute
on the assembly level like this:
[assembly: PreApplicationStartMethod(typeof(MyApp.Global), "InitializeApplication")]
See this explanation for more details on that.
Here's the declaration of InitializeApplication
:
public class Global : HttpApplication
{
public static void InitializeApplication()
{
// Initialization code goes here...
}
}
I am running my application on a local IIS 7.5 instance and I want to debug my InitializeApplication
method. I have set a break point on it but it doesn't get hit.
I figure that the code is executed when the Application Pool starts, which to my knowledge is before the point when I hit F5 in Visual Studio.
I have tried to attach the debugger to any IIS related process I could find but to no avail.
I also realize that I can debug using Cassini but I need to fix an IIS related issue here.
So, the question is: how can I debug the PreApplicationStartMethodAttribute
designated method?
Try to use IIS Express locally, probably it will be easier to attach debugger to it's process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With