0

I have a global.asax. and I have added a subscription to the LogRequest and BeginRequest

void Application_LogRequest(object sender, EventArgs e)
...
void Application_BeginRequest(object sender, EventArgs e)
....

First, I am not certain what is the real purpose of the LogRequest and when it should fire. I have also done a test application and I have breakpoints in the LogRequest and BeginRequest above. Somehow the LogRequest is never being fired - it never enters in the breakpoint. And the BeinRequest is firing correctly with each request. I have done some research online but there is very little about the LogRequest event apart from the fact that it should fire with each request ... but in my case it isn't.

I am running from VS but My website is deployed to IIS.

Many Thanks

Joseph Caruana
  • 2,241
  • 3
  • 31
  • 48

1 Answers1

1

According to MSDN Library:

The MapRequestHandler, LogRequest, and PostLogRequest events are supported only if the application is running in Integrated mode in IIS 7.0 and with the .NET Framework 3.0 or later.

So perhaps you are running IIS 6.0, or IIS 7.0 (or later) in Classic mode.

Michael Liu
  • 52,147
  • 13
  • 117
  • 150