No IIS http raw logs for Azure website


  • I'm had a search through the forum but I'm unable to figure out where I'm going wrong.

    I've got my Azure website (ASP.Net MVC 3 app) deployed and everything works fine. I've enabled all 3 logging options on the configure tab in the Azure portal. When I create an error on my site I get the error logs in my ftp location as expected. But I'm not seeing any general IIS logs being generated (general GET requests and 200 responses) in the LogFiles FTP directory, which is what I'd expect from enabling the 'WEB SERVER LOGGING' option.

    What am I missing? :/

    Wednesday, February 20, 2013 11:42 PM

All replies

  • Hi,

    Since the issue is related to Iaas, I have moved this thread to Web Sites forums for getting a better support.

    Thanks for your understanding.

    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 21, 2013 8:30 AM
  • Log files will be in the LogFiles/http folder. It can take a few minutes for the logs to be generated.

    Jim Cheshire | Microsoft

    Thursday, February 21, 2013 12:22 PM
  • Well it has been 5 days now, so I tried again and still no log files or even a 'http' directory.

    Reset all diagnostics logging to off, saved the configuration, switched logging to on, saved the configuration and then reset the site. Magically I started getting logs :/

    Thanks for looking guys, not sure quite what was going on.

    Monday, February 25, 2013 11:35 PM
  • I'm not sure why this happened. Please let us know if you experience this again so that we can investigate.

    Jim Cheshire | Microsoft

    Wednesday, February 27, 2013 4:37 PM
  • I'm seeing a similar problem with one of my Azure websites, but instead of seeing nothing, I see only some old logs. I have a 23MB log file dated 20th July 2012 (which is when I turned on Web Server Logging for this site) a 9.7MB log file dated 23rd July, but apparently nothing newer than that, even though the web site is constantly in use.

    From the look of it, Azure just gave up producing log files 2 weeks ago. I only noticed just now because I wanted to investigate a spike in my site's traffic that occurred last week. It's rather frustrating to discover that the logs appear not to be there. They're still switched on in the Azure management portal for that site.

    Monday, August 05, 2013 12:00 PM
  • I have had logging turned on for weeks but the last log entry in my logfiles\http\rawlogs folder is July 26. Did something change in the past two weeks to stop it?
    Tuesday, August 06, 2013 11:39 AM
  • We currently have a bug that causes logging to not restart after you hit the logging limit and clear out files. The way you can get logging going again is by scaling your site. You can just scale to a smaller/larger VM or scale to another level and back. Doing this will cause you to move to a new VM and logging should start again.

    We have fixed this and it will be rolled out in a future update.

    Jim Cheshire | Microsoft

    Tuesday, August 06, 2013 5:05 PM
  • I didn't realize there was a limit, especially one that low (~40MB). Is there a way to bump that up or even better, schedule something to periodically copy the logs to blob storage? I'd like to keep all logs for analysis.
    Tuesday, August 06, 2013 5:45 PM
  • Yes, the limit on logs is 35MB. Once you hit that limit, logging stops until you remove some of the files.

    You can actually configure it to store your HTTP logs on Azure Storage right now. Add your storage account and then configure Application Logging (Storage) in the portal. Set it to Verbose and enter your storage key. Once you do that, you will need to add an app setting for the site. The app setting name is AZURE_PREVIEW_HTTPLOGGINGTOBLOB and the value should be 1.

    Jim Cheshire | Microsoft

    Tuesday, August 06, 2013 7:59 PM
  • Jeff,

    We're changing the implementation of this before long, so let me collect details on what you need to do and I'll post soon.

    Jim Cheshire | Microsoft

    Tuesday, August 06, 2013 8:06 PM
  • Jim: Very cool! I followed your directions and now under httplogs\SITENAME\yyyy\mm\dd\hh I see logs for each machine name. This will work for now.

    I'd like to do some analysis on routes to see much time they took over time (~past 30 days) and to be on the lookout for automated attacks so that I could ban IPs as needed (although I don't think Azure Web Sites supports ipSecurity yet). I was either going to use a tool like HD Insight or load the log data into SQL Database to do these calculations.

    By the way, is there a list somewhere that has these preview settings? I'd love to experiment more with the platform to see if we can take advantage of more capabilities.

    Tuesday, August 06, 2013 8:16 PM
  • This "AZURE_PREVIEW_HTTPLOGGINGTOBLOB" feature seemed to stop working on August 23, 2013 at 16:34 PM UTC. Any reason for that?
    Thursday, August 29, 2013 12:06 AM
  • This feature has been modified a bit. Now you need to set an app setting called WEBSITE_HTTPLOGGING_CONTAINER_URL and set the value to a SAS URL for your container. You can use the following C# code to generate the SAS URL.

    using System;
    using System.Linq;
    using Microsoft.WindowsAzure.Storage;
    using Microsoft.WindowsAzure.Storage.Blob;
    namespace AzureStorageSas
        internal class Program
            private static void Main(string[] args)
                    string connectionString = "DefaultEndpointsProtocol=https;AccountName={ACCOUNT_NAME};AccountKey={ACCOUNT_KEY}";
                    string containerName = "httplogs".ToLowerInvariant();
                    CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
                    CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                    // Retrieve a reference to a container. 
                    CloudBlobContainer container = blobClient.GetContainerReference(containerName);
                    var sas = container.GetSharedAccessSignature(new SharedAccessBlobPolicy()
                        Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List | SharedAccessBlobPermissions.Write | SharedAccessBlobPermissions.Delete,
                        SharedAccessExpiryTime = DateTime.UtcNow.AddYears(1000)
                    Console.WriteLine(container.Uri + sas);
                catch (Exception ex)

    We also added a new app setting called WEBSITE_HTTPLOGGING_RETENTION_DAYS that you can set to the number of days you want logs retained.

    These settings will be available in the portal soon so that you don't have to jump through these hoops.

    Jim Cheshire | Microsoft

    Thursday, August 29, 2013 1:15 AM
  • Jim: I updated the settings per your instructions and now it's working again! I look forward to these being available directly on the portal because they're extremely useful.

    Thanks for all your work on this great feature.

    Thursday, August 29, 2013 2:44 PM
  • Wednesday, November 13, 2013 1:14 PM