The Duration property is initialized in System.Web.Configuration.OutputCacheProfile.cs
, here's the relevant code:
_propDuration = new ConfigurationProperty("duration", typeof(int), -1,
ConfigurationPropertyOptions.None);
and
[ConfigurationProperty("duration", DefaultValue = -1)]
public int Duration {
get {
return (int)base[_propDuration];
}
set {
base[_propDuration] = value;
}
}
Which sets it to a default of -1 which is an invalid value. Documentation for the Duration property mentions: 'The Duration must be defined in either the profile or the directive of a page using the profile.'
So, there's actually no (valid) default value, you are required to specify it.