void SetMacKey (byte[] macKeyModifier)
{
try {
#if NET_2_0
osf.Section.ValidationKey = MachineKeySectionUtils.GetHexString (macKeyModifier);
#else
osf.Section.SetValidationKey (MachineKeySectionUtils.GetHexString (macKeyModifier));
#endif
}
catch (ArgumentException) {
}
#if NET_2_0
catch (ConfigurationErrorsException) {
// bad key (e.g. size), default key will be used
}
#else
catch (HttpException) {
// bad key (e.g. size), default key will be used
}
#endif
}