2012年9月17日

[Azure][IIS]Enable IIS Failed Request Log

It is easy to enable IIS Failed request log on IIS 7+. First we need to enable Health and Diagnostic feature in Web Server Role via Server manager. Note that the feature is enabled by default on Windows Azure Role instances.

image

Once enabled, open IIS management console and navigate to Site node. There is a [Failed Request Tracing] link in Action panel, click on it to bring up Failed Request Tracing dialog box

image

Enable this feature, specify desired log directory and max. files then close it.

image

Now we can set Site leave or Application level trace files, in my example, I am going to enable Application level trace. So navigate to my web application, in content panel, a [Failed Request Tracing Rule] allows us to configure our desired rules for tracing this application.

Note that default log file path on Windows Azure is set to C:\Resources\directory\$DEPLOYMENT ID$.$RoleName$.DiagnosticStore\FailedReqLogFiles\$ProjecName$\$WCSVC ID$\

image

Open it and click on [Add…] link in Action panel to bring up configuration dialog box, we have several options here, in my example, I am going to enable trace files for ASPX requests.

image

Log status codes start from 400 to 599.

image

Her I just accept the defaults.

image

Once completed, a new rule is created.

image

沒有留言:

Blog Archive

About Me