Using Failed Request Tracing is a very useful tool for troubleshooting performance issue on your Windows Azure Web Site and for any website running on IIS. Windows Azure Web Sites does not currently support a remote desktop connection and therefore the configuration of the Failed Request Tracing feature is performed via the Windows Azure Management console.
Once logged in to the Windows Azure Management console, navigate to the Web Site where you are experiencing the slow response and select the CONFIGURE link. Scroll down until you find the Failed Request Tracing item within the Site Diagnostics section, Figure 1 illustrates this.
Figure 1, Enable Failed Request Tracing for a Windows Azure Web Site
Turn the diagnostic on and select the Save item as illustrated on Figure 2.
Figure 2, Failed Request Tracing in Windows Azure Web Sites
Once enabled, requests to your website will begin to be logged. By default, requests with an HTTP Status of 400-999 only, are logged. That means if you are getting an error of some kind, all you need to do is enable Failed Request logging from within the management console, download and review.
On the other hand, if you are experiencing slow responses where the HTTP Status is a 200, no Failed Request Tracing log will be generated as the result would not match the default rule parameters. To modify the Failed Request Tracing rule, you need to add something similar to the following code snippet within the <system.webServer> tag, to your web sites' web.config file.
<tracing> <traceFailedRequests> <remove path="*" /> <add path="*"> <traceAreas> <add provider="ASP" verbosity="Verbose" /> <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" /> <add provider="ISAPI Extension" verbosity="Verbose" /> <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression, Cache,RequestNotifications,Module,FastCGI" verbosity="Verbose" /> </traceAreas> <failureDefinitions timeTaken="00:00:05" statusCodes="200-999" /> </add> </traceFailedRequests></tracing>
To configure FTP capabilities for you Windows Azure Web Site, look at the features available on the DASHBOARD link for the given Web Site. A nice blog on how to set this up FTP and download the log files can be found here and here.
The log files, when created, are stored in the /LogFiles/W3SVC* directory, an example of this using FileZilla FTP client, is shown in Figure 3.
Figure 3, Failed Request Tracing logs storage location
Once downloaded, open the files in Internet Explorer and analyze them.