ASP.NET cached aspx page and IIS logs
Is there a way to find out if the ASP.Net runtime has completed a cached copy of the ASPX page or has actually passed the page's lifecycle?
Here's my problem:
I see a lot of entries in my IIS log files that were sent successfully (200 OK) . I have corresponding logging code (Log4Net API) in Session_Start and Application_BeginRequest () events that log each request to my DB with more details. I don't see any relevant entries in my SQL DB for some cases that should have been created using Log4Net code.
Are there logs available to see if a cached instance has been processed by a .NET worker process? Moreover, if my logging code throws an exception, won't it show up as 500 in the IIS logs?
The code is on Windows 2008 Server, IIS 7.
PS: If assembling the build permissions and writing to the database can help track this down? Can anyone point me to an example?
a source to share
If you don't want to manually add more logs, you can simply enable tracing. To enable tracing, open your web.config and find the tag .... Set enabled = "true", save the web.config file, then go to http: // {your site} /trace.axd and view the page trace events ...
You can check if you can see the call caching by first viewing the page, then clicking and returning to it, and then checking the trace to see the differences in the recorded events. You should see the cache fetch in the trail of the second pageview.
Here's more information on this great feature from MS: http://msdn.microsoft.com/en-us/library/1y89ed7z(VS.71).aspx
You also have the option in your code to write the trace output using Trace.Write or Trace.Warn. This is a great way to add some debugging code that will only work when tracing is enabled.
NTN, Spear
a source to share