Current Position:Home > Changing IIS log file rollover period

Changing IIS log file rollover period

Update:11-30Source: network consolidation
Advertisement
Hi,
I have a question that I hope that someone could help me with.
I have an Azure Cloud service running a web role. I want to change the IIS access log file rollover from hourly to daily. The way I approach this is to create a Startup task in this way:
<Startup>
<Task commandLine="Startup\Startup.cmd" executionContext="elevated">
<Environment>
<Variable name="CurrentInstanceId">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/@id" />
</Variable>
</Environment>
</Task>
</Startup>
In Startup.cmd, I then have the following code:
setlocal
rem Set IIS Log File Rollover to daily
%systemroot%\system32\inetsrv\appcmd.exe set config -section:system.applicationHost/sites /[name='%CurrentInstanceId%_Web'].logFile.period:"Daily"
This seems like a fairly straightforward approach, but it doesn't work. The cloud services will not start when published with this command in Startup.cmd. My guess is that the web site isn't properly set up in IIS when the script is run, or that changing
this setting restarts the site, triggering the script to run again.
If anyone has any smart ideas about how I should solve my issue?
BR,
Per

The Best Answer

Advertisement
Hi,
From my experience, we can RDP to one cloud service instance to check the iis to ensure the web site and the iis configuration, about how to use startup Configure IIS Components in Windows Azure, please refer to
http://msdn.microsoft.com/en-us/library/gg433059.aspx for more information.
Hope this helps
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
  • Changing IIS log file rollover period Update:11-30

    Hi, I have a question that I hope that someone could help me with. I have an Azure Cloud service running a web role. I want to change the IIS access log file rollover from hourly to daily. The way I approach this is to create a Startup task in this w

  • CR2008  Cannot report on IIS Log file data source Update:11-30

    I have CR2008 (SP0) and CRXIR2 installed on a Vista desktop.   I can create reports against IIS Log files using XIR2.   When I attempt to make the data connection using CR2008, I go through the same dialog to select log files and dates but at the end

  • Move IIS Log files to AWS S3 Bucket... Update:11-30

    I'm seeking to automate a process that will copy or move IIS logs to a remote location. The following variables must be taken into account = 1. Copy or Move all IIS logs (xcopy?) to another location. (Each server maintains several websites) 2. Delete

  • Can I append to IIS log files with jsp? Update:11-30

    When we added a load balancer, our IIS logs started using its IP address in the logfile and not the client's real IP address. I need to add the client's real address back into the IIS logs, so our reports can restart having the correct session number

  • Zip IIS log files Update:11-30

    I have a folder with a number of IIS Logs. I would like to zip and archive the IIS logs but when I zip and archive, I do not want to store everything in 1 zip folder. As a matter of fact, I would like to create 1 zip folder per log and want the folde

  • Need Help - IIS Web Server Log Files Update:11-30

    Hi - We run a java applet on our web site and it runs fine. The problem is that in our log files we get hammered with this 404 error all the time. Can't find ConsultScrollBeanInfo.class The software maker says it is a bug with Java 2 SDK. If this is

  • File system task - Move file issue, skip the current log file thats open by another process - IIS logs Update:11-30

    Hi, I have created a package to move IIS log files from their source directory to another directory called processing. However, when the package tries to move the current log file it errors because the file is in use by another process (by IIS as its

  • Design a report off a log file Update:11-30

    Crystal reports version XI I would like to design  a report off a log file (with .log extention). How would i go about it? (like data source etc) Any input iappreciated. Thanks in advance, padieFollowing SAP note could be useful too: Follow the link

  • MOSS 2007 IIS logs on our servers are consuming large spaces on drive. Update:11-30

    Hi, our IIS logs are filled up with large memory and i  am trying to minimize iis logging log files size. Can someone please help me with the solution to minimize iis log files size. Thanks. BadriHi Sanjeev, Did these users use IE10 to access SharePo

  • Setting IIS W3C Extended Log File settings via command line, registry or configuration file Update:11-30

    I am currently in need of a way to set IIS W3C Extended Log File settings via command line, registry or configuration file.  More specifically the 'Bytes Sent (sc-bytes)' and 'Bytes Received (cs-bytes)' settings that are not enabled by default.  If a