From 1727a86d07f230eab8821b8fdb565e88d2d0f4c5 Mon Sep 17 00:00:00 2001 From: Michael Latouche Date: Mon, 20 Jul 2015 01:15:15 +0200 Subject: [PATCH 1/2] initial add SmtpSettings --- Solution/build-bin/HLF.ContextConfig.dll | Bin 15872 -> 20480 bytes Solution/build-bin/HLF.ContextConfig.pdb | Bin 48640 -> 60928 bytes Solution/build-config/ContextConfig.config | 115 +- Source/HLF.ContextConfig/ConfigSettings.cs | 1254 ++++++++++------- Source/HLF.ContextConfig/ContextConfig.config | 115 +- Source/HLF.ContextConfig/ContextConfig.cs | 920 ++++++------ Source/TestSite/Default.aspx.cs | 575 ++++---- Source/TestSite/Web.config | 6 +- 8 files changed, 1702 insertions(+), 1283 deletions(-) diff --git a/Solution/build-bin/HLF.ContextConfig.dll b/Solution/build-bin/HLF.ContextConfig.dll index 40cbccbb8de7c249849f08d3aac62ecd219d159c..0d19edc710fa54c03fc9a2b07c9f631f6f8a3345 100644 GIT binary patch literal 20480 zcmeHv4Rl-8mF~V*($$Y;C6b*#ViSd6qQtgh#|b2m&^WP^ION~?DKs?5(zPv+b%i7+ zF_2VQudv8aD3rCBGSCjRg-&K>&A{r)*A(FoqhH`d+)Q)KKuOKYqni+J9&u6i|@Pd5>h}$sx-@D=E3}W&F^r1WYQ*S-j06laXlYZI*Xe4M z5^%Ud`s{bKaG-M)B`{8*(6<+$bs~yl5kd+J5>^c527j}^*=jHWc!*pIduj^9u4sf%un$LZ3H;fqLad@ct9S^!%wQGcoGFO)n z#GwY7lenB6*b1b{*WMcQCC)`LO#Xlc?M8sb8W!9KTR}w2kaX|)Q!`?|cV@$~`PM?F zexG!ITa$5=ZH*csG8)?{xD<*omO34w2cKP6_Kw#*oqJ*PBIx)2Z`V zG-5>qv)x9KtVN)N+R0dY9wi_P5e3F`m0O_}dc5=-{Q6i=>3rrk5^eagE&$-ER5*q> z@g^2?9V`l2O90SWv<@ZO0UCpyi^<*S=$RV1TcIOpco7-16CDszfdSrQ3^0Nq%q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rn5#(Wp1Yn~zaHNkygrW;2u zKAoSpv3cQ570P0N*o!rA40S6JFjs29eJF-v3vaFCULIJ!)47*1>0GU__5r&A zojKJW)&l$6yba_t(Rqg^0OL&)xg=nIl#GqWLOKF z2gr`)Q^*Iqo84jsPYAM*@21hxf0v_wC-nn+!Ic zOyT-iK>oRWu4%yWzzKkKApi6v;ABAcnF*8vvj84XxvyDOfVDGL3Csbi0Bs9a1M`6S zz@GsNfKz}|fzyB*U?H#ws0HeP#Xvo<1ZV(G2bKcMfaSmnU?p${unIU6*j3PbH~YiB HtAYOyEEWG< diff --git a/Solution/build-config/ContextConfig.config b/Solution/build-config/ContextConfig.config index 836868d..d22601f 100644 --- a/Solution/build-config/ContextConfig.config +++ b/Solution/build-config/ContextConfig.config @@ -1,53 +1,62 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/HLF.ContextConfig/ConfigSettings.cs b/Source/HLF.ContextConfig/ConfigSettings.cs index 1908661..5735f97 100644 --- a/Source/HLF.ContextConfig/ConfigSettings.cs +++ b/Source/HLF.ContextConfig/ConfigSettings.cs @@ -1,473 +1,781 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Configuration; -using System.Web; - -namespace HLF.ContextConfig -{ - /// - /// The 'ConfigSettings' class give you direct access to all the configured data using collections and dot(.) notation. - /// *Note: you will need to explicitly declare objects of the element types in order to use their properties. - /// example: - /// foreach (DomainElement Domain in ConfigSettings.Settings.Domains) - /// { string EnvironmentName = Domain.Environment;} - /// - public class ConfigSettings : ConfigurationSection - { - //Config File Object - private static string _configfile = "ContextConfig.config"; - private static ConfigSettings _Config; - private static Configuration config; - - /// - /// Represents all the ConfigSettings - /// - public static ConfigSettings Settings = GetSettings(); - - internal static ConfigSettings GetSettings() - { - ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap(); - fileMap.ExeConfigFilename = HttpContext.Current.Server.MapPath(string.Format("~/config/{0}", _configfile)); - - if (! System.IO.File.Exists(fileMap.ExeConfigFilename)) - { - //if file doesn't exist in /config/ folder, check in site root. - fileMap.ExeConfigFilename = HttpContext.Current.Server.MapPath(string.Format("~/{0}", _configfile)); - } - - if (System.IO.File.Exists(fileMap.ExeConfigFilename)) - { - // load the settings file - config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); - - if (config != null) - { - _Config = (ConfigSettings)config.GetSection("ContextConfig"); - } - } - else - { - string ErrorMsg = string.Format("The 'ContextConfig.config' file cannot be found. Please add it to the '~/config/' folder or site root."); - throw new MissingConfigFileException(ErrorMsg); - } - - if (_Config == null) - { - string ErrorMsg = string.Format("There is something wrong with the 'ContextConfig.config' file. Please check that a properly formatted file is located in the '~/config/' folder or site root."); - throw new MissingConfigFileException(ErrorMsg); - //_Config = new ConfigSettings(); // default config - won't be savable mind? - } - - return _Config; - } - - #region *** ConfigurationProperties *** - - /// - /// <ContextConfig> 'version' attribute - /// - [ConfigurationProperty("version")] - public string Version - { - get { return (string)base["version"]; } - } - - /// - /// <ContextConfig> 'OverrideConfigurationManager' attribute - /// - [ConfigurationProperty("OverrideConfigurationManager")] - public bool OverrideConfigurationManager - { - get - { - //string ConfigValue = (string)base["OverrideConfigurationManager"]; - //return Convert.ToBoolean(ConfigValue); - return (bool)base["OverrideConfigurationManager"]; - } - } - - /// - /// <ContextConfig> <Domains> collection - /// - [ConfigurationProperty("Domains")] - public DomainElementCollection Domains - { - get { return (DomainElementCollection) base["Domains"]; } - } - - /// - /// <ContextConfig> <Environments> collection - /// - [ConfigurationProperty("Environments")] - public EnvironmentElementCollection Environments - { - get { return (EnvironmentElementCollection) base["Environments"]; } - } - - #endregion - - } - - #region *** Element Objects *** - - /// - /// Represents a Domain from the config file - /// - public class DomainElement : ConfigurationElement - { - /// - /// <Domain> 'url' attribute - /// - [ConfigurationProperty("url", IsRequired = true)] - public string Url - { - get { return (string) base["url"]; } - } - - /// - /// <Domain> 'environment' attribute - /// - [ConfigurationProperty("environment", IsRequired = true)] - public string Environment - { - get { return (string) base["environment"]; } - } - - /// - /// <Domain> 'sitename' attribute - /// - [ConfigurationProperty("sitename", IsRequired = false)] - public string SiteName - { - get { return (string)base["sitename"]; } - } - } - - /// - /// Represents a defined Environment from the config file - /// - public class EnvironmentElement : ConfigurationElement - { - - /// - /// <Environment> 'name' attribute - /// - [ConfigurationProperty("name", IsRequired = true)] - public string Name - { - get { return (string) base["name"]; } - } - - - /// - /// <Environment> <Configs> (key/values) collection - /// - [ConfigurationProperty("Configs")] - public KeyValueElementCollection Configs - { - get { return (KeyValueElementCollection) base["Configs"]; } - } - - } - - /// - /// Represents a Key/Value pair defined for an environment in the config file - /// - public class KeyValueElement : ConfigurationElement - { - - /// - /// <Environment> <add> 'key' attribute - /// - [ConfigurationProperty("key", IsRequired = true)] - public string Key - { - get { return (string) base["key"]; } - } - - /// - /// <Environment> <add>'value' attribute - /// - [ConfigurationProperty("value", IsRequired = false)] - public string Value - { - get { return (string) base["value"]; } - } - } - - #endregion - - #region *** Element Collections *** - - /// - /// Represents all the Domains defined in the config file - /// - [ConfigurationCollection(typeof (DomainElement), AddItemName = "Domain", - CollectionType = ConfigurationElementCollectionType.BasicMap)] - public class DomainElementCollection : ConfigurationElementCollection - { - /// - /// Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. - /// - /// - /// The name of the collection; otherwise, an empty string. The default is an empty string. - /// - protected override string ElementName - { - get { return "Domain"; } - } - - //Basic Stuff - /// - /// Gets the type of the . - /// - /// - /// The of this collection. - /// - public override ConfigurationElementCollectionType CollectionType - { - get { return ConfigurationElementCollectionType.BasicMap; } - } - - /// - /// When overridden in a derived class, creates a new . - /// - /// - /// A new . - /// - protected override ConfigurationElement CreateNewElement() - { - return new DomainElement(); - } - - /// - /// Integer index - /// - /// - public DomainElement this[int index] - { - get { return (DomainElement) base.BaseGet(index); } - set - { - if (base.BaseGet(index) != null) - { - base.BaseRemoveAt(index); - } - base.BaseAdd(index, value); - } - } - - //Custom Key - /// - /// Gets the element key for a specified configuration element when overridden in a derived class. - /// - /// - /// An that acts as the key for the specified . - /// - /// The to return the key for. - protected override object GetElementKey(ConfigurationElement element) - { - return (element as DomainElement).Url; - } - - /// - /// - /// - /// - public new DomainElement this[string url] - { - get { return (DomainElement) base.BaseGet(url); } - } - } - - /// - /// Represents all the Environments defined in the config file - /// - [ConfigurationCollection(typeof (EnvironmentElement), AddItemName = "Environment", - CollectionType = ConfigurationElementCollectionType.BasicMap)] - public class EnvironmentElementCollection : ConfigurationElementCollection - { - /// - /// Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. - /// - /// - /// The name of the collection; otherwise, an empty string. The default is an empty string. - /// - protected override string ElementName - { - get { return "Environment"; } - } - - //Basic Stuff - /// - /// Gets the type of the . - /// - /// - /// The of this collection. - /// - public override ConfigurationElementCollectionType CollectionType - { - get { return ConfigurationElementCollectionType.BasicMap; } - } - - /// - /// When overridden in a derived class, creates a new . - /// - /// - /// A new . - /// - protected override ConfigurationElement CreateNewElement() - { - return new EnvironmentElement(); - } - - /// - /// - /// - /// - public EnvironmentElement this[int index] - { - get { return (EnvironmentElement) base.BaseGet(index); } - set - { - if (base.BaseGet(index) != null) - { - base.BaseRemoveAt(index); - } - base.BaseAdd(index, value); - } - } - - //Custom Key - /// - /// Gets the element key for a specified configuration element when overridden in a derived class. - /// - /// - /// An that acts as the key for the specified . - /// - /// The to return the key for. - protected override object GetElementKey(ConfigurationElement element) - { - return (element as EnvironmentElement).Name; - } - - /// - /// - /// - /// - public new EnvironmentElement this[string name] - { - get { return (EnvironmentElement) base.BaseGet(name); } - } - } - - /// - /// Represents all the Key/Value pair elements defined in the config file - /// - [ConfigurationCollection(typeof (KeyValueElement), AddItemName = "add", - CollectionType = ConfigurationElementCollectionType.BasicMap)] - public class KeyValueElementCollection : ConfigurationElementCollection - { - /// - /// Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. - /// - /// - /// The name of the collection; otherwise, an empty string. The default is an empty string. - /// - protected override string ElementName - { - get { return "add"; } - } - - //Basic Stuff - /// - /// Gets the type of the . - /// - /// - /// The of this collection. - /// - public override ConfigurationElementCollectionType CollectionType - { - get { return ConfigurationElementCollectionType.BasicMap; } - } - - /// - /// When overridden in a derived class, creates a new . - /// - /// - /// A new . - /// - protected override ConfigurationElement CreateNewElement() - { - return new KeyValueElement(); - } - - /// - /// - /// - /// - public KeyValueElement this[int index] - { - get { return (KeyValueElement) base.BaseGet(index); } - set - { - if (base.BaseGet(index) != null) - { - base.BaseRemoveAt(index); - } - base.BaseAdd(index, value); - } - } - - //Custom Key - /// - /// Gets the element key for a specified configuration element when overridden in a derived class. - /// - /// - /// An that acts as the key for the specified . - /// - /// The to return the key for. - protected override object GetElementKey(ConfigurationElement element) - { - return (element as KeyValueElement).Key; - } - - /// - /// - /// - /// - public new KeyValueElement this[string key] - { - get { return (KeyValueElement) base.BaseGet(key); } - } - } - - #endregion - - #region *** Custom Exceptions *** - - [Serializable] - internal class MissingConfigFileException : Exception - { - // Use the default ApplicationException constructors - public MissingConfigFileException() - : base() - { - } - - public MissingConfigFileException(string s) - : base(s) - { - } - - public MissingConfigFileException(string s, Exception ex) - : base(s, ex) - { - } - } - - #endregion -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Configuration; +using System.Web; + +namespace HLF.ContextConfig +{ + /// + /// The 'ConfigSettings' class give you direct access to all the configured data using collections and dot(.) notation. + /// *Note: you will need to explicitly declare objects of the element types in order to use their properties. + /// example: + /// foreach (DomainElement Domain in ConfigSettings.Settings.Domains) + /// { string EnvironmentName = Domain.Environment;} + /// + public class ConfigSettings : ConfigurationSection + { + //Config File Object + private static string _configfile = "ContextConfig.config"; + private static ConfigSettings _Config; + private static Configuration config; + + /// + /// Represents all the ConfigSettings + /// + public static ConfigSettings Settings = GetSettings(); + + internal static ConfigSettings GetSettings() + { + ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap(); + fileMap.ExeConfigFilename = HttpContext.Current.Server.MapPath(string.Format("~/config/{0}", _configfile)); + + if (! System.IO.File.Exists(fileMap.ExeConfigFilename)) + { + //if file doesn't exist in /config/ folder, check in site root. + fileMap.ExeConfigFilename = HttpContext.Current.Server.MapPath(string.Format("~/{0}", _configfile)); + } + + if (System.IO.File.Exists(fileMap.ExeConfigFilename)) + { + // load the settings file + config = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); + + if (config != null) + { + _Config = (ConfigSettings)config.GetSection("ContextConfig"); + } + } + else + { + string ErrorMsg = string.Format("The 'ContextConfig.config' file cannot be found. Please add it to the '~/config/' folder or site root."); + throw new MissingConfigFileException(ErrorMsg); + } + + if (_Config == null) + { + string ErrorMsg = string.Format("There is something wrong with the 'ContextConfig.config' file. Please check that a properly formatted file is located in the '~/config/' folder or site root."); + throw new MissingConfigFileException(ErrorMsg); + //_Config = new ConfigSettings(); // default config - won't be savable mind? + } + + return _Config; + } + + #region *** ConfigurationProperties *** + + /// + /// <ContextConfig> 'version' attribute + /// + [ConfigurationProperty("version")] + public string Version + { + get { return (string)base["version"]; } + } + + /// + /// <ContextConfig> 'OverrideConfigurationManager' attribute + /// + [ConfigurationProperty("OverrideConfigurationManager")] + public bool OverrideConfigurationManager + { + get + { + //string ConfigValue = (string)base["OverrideConfigurationManager"]; + //return Convert.ToBoolean(ConfigValue); + return (bool)base["OverrideConfigurationManager"]; + } + } + + /// + /// <ContextConfig> <Domains> collection + /// + [ConfigurationProperty("Domains")] + public DomainElementCollection Domains + { + get { return (DomainElementCollection) base["Domains"]; } + } + + /// + /// <ContextConfig> <Environments> collection + /// + [ConfigurationProperty("Environments")] + public EnvironmentElementCollection Environments + { + get { return (EnvironmentElementCollection) base["Environments"]; } + } + + #endregion + + } + + #region *** Element Objects *** + + /// + /// Represents a Domain from the config file + /// + public class DomainElement : ConfigurationElement + { + /// + /// <Domain> 'url' attribute + /// + [ConfigurationProperty("url", IsRequired = true)] + public string Url + { + get { return (string) base["url"]; } + } + + /// + /// <Domain> 'environment' attribute + /// + [ConfigurationProperty("environment", IsRequired = true)] + public string Environment + { + get { return (string) base["environment"]; } + } + + /// + /// <Domain> 'sitename' attribute + /// + [ConfigurationProperty("sitename", IsRequired = false)] + public string SiteName + { + get { return (string)base["sitename"]; } + } + } + + /// + /// Represents a defined Environment from the config file + /// + public class EnvironmentElement : ConfigurationElement + { + + /// + /// <Environment> 'name' attribute + /// + [ConfigurationProperty("name", IsRequired = true)] + public string Name + { + get { return (string) base["name"]; } + } + + /// + /// <Environment> <Configs> (key/values) collection + /// + [ConfigurationProperty("Configs")] + public KeyValueElementCollection Configs + { + get { return (KeyValueElementCollection) base["Configs"]; } + } + + /// + /// <Environment> <SmtpSettings> element + /// + [ConfigurationProperty("SmtpSettings", IsRequired=false)] + public SmtpSettingsElement SmtpSettings + { + get { return (SmtpSettingsElement)base["SmtpSettings"]; } + } + } + + /// + /// Represents a Key/Value pair defined for an environment in the config file + /// + public class KeyValueElement : ConfigurationElement + { + + /// + /// <Environment> <add> 'key' attribute + /// + [ConfigurationProperty("key", IsRequired = true)] + public string Key + { + get { return (string) base["key"]; } + } + + /// + /// <Environment> <add>'value' attribute + /// + [ConfigurationProperty("value", IsRequired = false)] + public string Value + { + get { return (string) base["value"]; } + } + } + + public abstract class SmtpConfigurationElement : ConfigurationElement + { + System.Net.Mail.SmtpClient _smtpDefaults; + + /// + /// Returns an smtp client object. Helper object used to return default smtp config values in case they are + /// not provided in this section. + /// + protected System.Net.Mail.SmtpClient SmtpDefaults + { + get + { + if (_smtpDefaults == null) + _smtpDefaults = new System.Net.Mail.SmtpClient(); + return _smtpDefaults; + } + } + + /// + /// Checks whether a specific configuration property was provided or was absent from the configuration element + /// + /// Name of the property to check on + /// + internal bool IsPropertyUndefined(string PropertyName) + { + var property = this.ElementInformation.Properties[PropertyName]; + + return property == null || property.ValueOrigin == PropertyValueOrigin.Default; + } + } + + /// + /// Represents the SmtpSettings defined for an environment in the config file + /// + public class SmtpSettingsElement : SmtpConfigurationElement + { + #region const + internal const string DeliveryMethodPropertyName = "deliveryMethod"; + #endregion + + + /// + /// <SmtpSettings> 'deliveryMethod' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty(DeliveryMethodPropertyName, IsRequired = false)] + public System.Net.Mail.SmtpDeliveryMethod DeliveryMethod + { + get + { + if (IsPropertyUndefined(DeliveryMethodPropertyName)) + return SmtpDefaults.DeliveryMethod; // return default value + + return (System.Net.Mail.SmtpDeliveryMethod)base[DeliveryMethodPropertyName]; + } + } + + /// + /// <SmtpSettings> 'deliveryFormat' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("deliveryFormat", IsRequired = false)] + public System.Net.Mail.SmtpDeliveryFormat DeliveryFormat + { + get + { + if (IsPropertyUndefined("deliveryFormat")) + return SmtpDefaults.DeliveryFormat; // return default value + + return (System.Net.Mail.SmtpDeliveryFormat)base["deliveryFormat"]; + } + } + + /// + /// <SmtpSettings> 'from' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("from", IsRequired = false)] + public string From + { + get + { + if (IsPropertyUndefined("from")) + { + // return default value, if provided + var defaultFrom = new System.Net.Mail.MailMessage().From; + if (defaultFrom != null) + return defaultFrom.Address; // we have a default from address + } + + return (string)base["from"]; + } + } + + /// + /// <SmtpSettings> 'network' element. + /// Defaults to the base smtp network settings value if not provided in this config section. + /// + [ConfigurationProperty("network", IsRequired = false)] + public SmtpNetworkElement Network + { + get + { + return (SmtpNetworkElement)base["network"]; + } + set + { + this["network"] = value; + } + } + + /// + /// <SmtpSettings> 'specifiedPickupDirectory' element. + /// Defaults to the base smtp specifiedPickupDirectory settings value if not provided in this config section. + /// + [ConfigurationProperty("specifiedPickupDirectory", IsRequired = false)] + public SmtpSpecifiedPickupDirectoryElement SpecifiedPickupDirectory + { + get { return (SmtpSpecifiedPickupDirectoryElement)base["specifiedPickupDirectory"]; } + } + } + + /// + /// Represents the Network configuration for SmtpSettings defined for an environment in the config file + /// + public class SmtpNetworkElement : SmtpConfigurationElement + { + /// + /// <Network> 'clientDomain' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("clientDomain", IsRequired = false)] + public string ClientDomain + { + get + { + if (UseDefaultCredentials) + return string.Empty; + + if (IsPropertyUndefined("clientDomain")) + { + var defaultCredentials = (System.Net.NetworkCredential)SmtpDefaults.Credentials; + + if (defaultCredentials != null) + return defaultCredentials.Domain; + } + + return (string)base["clientDomain"]; + } + } + + /// + /// <Network> 'userName' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("userName", IsRequired = false)] + public string UserName + { + get + { + if (UseDefaultCredentials) + return string.Empty; + + if (IsPropertyUndefined("userName")) + { + var defaultCredentials = (System.Net.NetworkCredential)SmtpDefaults.Credentials; + + if (defaultCredentials != null) + return defaultCredentials.UserName; + } + + return (string)base["userName"]; + } + } + + /// + /// <Network> 'password' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("password", IsRequired = false)] + public string Password + { + get + { + if (UseDefaultCredentials) + return string.Empty; + + if (IsPropertyUndefined("password")) + { + var defaultCredentials = (System.Net.NetworkCredential)SmtpDefaults.Credentials; + + if (defaultCredentials != null) + return defaultCredentials.Password; + } + + return (string)base["password"]; + } + } + + /// + /// <Network> 'defaultCredentials' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("defaultCredentials", IsRequired = false)] + public bool UseDefaultCredentials + { + get + { + if (IsPropertyUndefined("defaultCredentials")) + return SmtpDefaults.UseDefaultCredentials; + + return (bool)base["defaultCredentials"]; + } + } + + /// + /// <Network> 'enableSsl' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("enableSsl", IsRequired = false)] + public bool EnableSsl + { + get + { + if (IsPropertyUndefined("enableSsl")) + return SmtpDefaults.EnableSsl; + + return (bool)base["enableSsl"]; + } + } + + /// + /// <Network> 'host' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("host", IsRequired = false)] + public string Host + { + get + { + if (IsPropertyUndefined("host")) + return SmtpDefaults.Host; + + return (string)base["host"]; + } + } + + /// + /// <Network> 'port' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("port", IsRequired = false)] + public int Port + { + get + { + if (IsPropertyUndefined("port")) + return SmtpDefaults.Port; + + return (int)base["port"]; + } + } + + /// + /// <Network> 'targetName' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("targetName", IsRequired = false)] + public string TargetName + { + get + { + if (IsPropertyUndefined("targetName")) + return SmtpDefaults.TargetName; + + return (string)base["targetName"]; + } + } + } + + /// + /// Represents the SpecifiedPickupDirectory configuration for SmtpSettings defined for an environment in the config file + /// + public class SmtpSpecifiedPickupDirectoryElement : SmtpConfigurationElement + { + /// + /// <SpecifiedPickupDirectory> 'pickupDirectoryLocation' attribute. + /// Defaults to the base smtp settings value if not provided in this config section. + /// + [ConfigurationProperty("pickupDirectoryLocation", IsRequired = false)] + public string PickupDirectoryLocation + { + get + { + if (IsPropertyUndefined("pickupDirectoryLocation")) + return SmtpDefaults.PickupDirectoryLocation; + + return (string)base["pickupDirectoryLocation"]; + } + } + } + #endregion + + #region *** Element Collections *** + + /// + /// Represents all the Domains defined in the config file + /// + [ConfigurationCollection(typeof (DomainElement), AddItemName = "Domain", + CollectionType = ConfigurationElementCollectionType.BasicMap)] + public class DomainElementCollection : ConfigurationElementCollection + { + /// + /// Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. + /// + /// + /// The name of the collection; otherwise, an empty string. The default is an empty string. + /// + protected override string ElementName + { + get { return "Domain"; } + } + + //Basic Stuff + /// + /// Gets the type of the . + /// + /// + /// The of this collection. + /// + public override ConfigurationElementCollectionType CollectionType + { + get { return ConfigurationElementCollectionType.BasicMap; } + } + + /// + /// When overridden in a derived class, creates a new . + /// + /// + /// A new . + /// + protected override ConfigurationElement CreateNewElement() + { + return new DomainElement(); + } + + /// + /// Integer index + /// + /// + public DomainElement this[int index] + { + get { return (DomainElement) base.BaseGet(index); } + set + { + if (base.BaseGet(index) != null) + { + base.BaseRemoveAt(index); + } + base.BaseAdd(index, value); + } + } + + //Custom Key + /// + /// Gets the element key for a specified configuration element when overridden in a derived class. + /// + /// + /// An that acts as the key for the specified . + /// + /// The to return the key for. + protected override object GetElementKey(ConfigurationElement element) + { + return (element as DomainElement).Url; + } + + /// + /// + /// + /// + public new DomainElement this[string url] + { + get { return (DomainElement) base.BaseGet(url); } + } + } + + /// + /// Represents all the Environments defined in the config file + /// + [ConfigurationCollection(typeof (EnvironmentElement), AddItemName = "Environment", + CollectionType = ConfigurationElementCollectionType.BasicMap)] + public class EnvironmentElementCollection : ConfigurationElementCollection + { + /// + /// Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. + /// + /// + /// The name of the collection; otherwise, an empty string. The default is an empty string. + /// + protected override string ElementName + { + get { return "Environment"; } + } + + //Basic Stuff + /// + /// Gets the type of the . + /// + /// + /// The of this collection. + /// + public override ConfigurationElementCollectionType CollectionType + { + get { return ConfigurationElementCollectionType.BasicMap; } + } + + /// + /// When overridden in a derived class, creates a new . + /// + /// + /// A new . + /// + protected override ConfigurationElement CreateNewElement() + { + return new EnvironmentElement(); + } + + /// + /// + /// + /// + public EnvironmentElement this[int index] + { + get { return (EnvironmentElement) base.BaseGet(index); } + set + { + if (base.BaseGet(index) != null) + { + base.BaseRemoveAt(index); + } + base.BaseAdd(index, value); + } + } + + //Custom Key + /// + /// Gets the element key for a specified configuration element when overridden in a derived class. + /// + /// + /// An that acts as the key for the specified . + /// + /// The to return the key for. + protected override object GetElementKey(ConfigurationElement element) + { + return (element as EnvironmentElement).Name; + } + + /// + /// + /// + /// + public new EnvironmentElement this[string name] + { + get { return (EnvironmentElement) base.BaseGet(name); } + } + } + + /// + /// Represents all the Key/Value pair elements defined in the config file + /// + [ConfigurationCollection(typeof (KeyValueElement), AddItemName = "add", + CollectionType = ConfigurationElementCollectionType.BasicMap)] + public class KeyValueElementCollection : ConfigurationElementCollection + { + /// + /// Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class. + /// + /// + /// The name of the collection; otherwise, an empty string. The default is an empty string. + /// + protected override string ElementName + { + get { return "add"; } + } + + //Basic Stuff + /// + /// Gets the type of the . + /// + /// + /// The of this collection. + /// + public override ConfigurationElementCollectionType CollectionType + { + get { return ConfigurationElementCollectionType.BasicMap; } + } + + /// + /// When overridden in a derived class, creates a new . + /// + /// + /// A new . + /// + protected override ConfigurationElement CreateNewElement() + { + return new KeyValueElement(); + } + + /// + /// + /// + /// + public KeyValueElement this[int index] + { + get { return (KeyValueElement) base.BaseGet(index); } + set + { + if (base.BaseGet(index) != null) + { + base.BaseRemoveAt(index); + } + base.BaseAdd(index, value); + } + } + + //Custom Key + /// + /// Gets the element key for a specified configuration element when overridden in a derived class. + /// + /// + /// An that acts as the key for the specified . + /// + /// The to return the key for. + protected override object GetElementKey(ConfigurationElement element) + { + return (element as KeyValueElement).Key; + } + + /// + /// + /// + /// + public new KeyValueElement this[string key] + { + get { return (KeyValueElement) base.BaseGet(key); } + } + } + + #endregion + + #region *** Custom Exceptions *** + + [Serializable] + internal class MissingConfigFileException : Exception + { + // Use the default ApplicationException constructors + public MissingConfigFileException() + : base() + { + } + + public MissingConfigFileException(string s) + : base(s) + { + } + + public MissingConfigFileException(string s, Exception ex) + : base(s, ex) + { + } + } + + #endregion +} diff --git a/Source/HLF.ContextConfig/ContextConfig.config b/Source/HLF.ContextConfig/ContextConfig.config index 836868d..d22601f 100644 --- a/Source/HLF.ContextConfig/ContextConfig.config +++ b/Source/HLF.ContextConfig/ContextConfig.config @@ -1,53 +1,62 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/HLF.ContextConfig/ContextConfig.cs b/Source/HLF.ContextConfig/ContextConfig.cs index 911b380..62451ac 100644 --- a/Source/HLF.ContextConfig/ContextConfig.cs +++ b/Source/HLF.ContextConfig/ContextConfig.cs @@ -1,436 +1,484 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web; - -namespace HLF.ContextConfig -{ - /// - /// The 'ContextConfig' static class includes useful functions to test and return data about domains, environments, and configured key/value pairs. - /// - public static class ContextConfig - { - - #region Domain Info - - /// - /// Current active domain url - /// - public static string CurrentDomain = HttpContext.Current.Request.ServerVariables["HTTP_HOST"].ToString(); - - /// - /// Check whether the current domain exists in the Domains list - /// - /// If there is a wildcard (*) domain specified, return true? (Choose false to explicitly search for this url) - /// - public static bool DomainIsConfigured(bool AcceptWildcard = true) - { - return DomainIsConfigured(CurrentDomain, AcceptWildcard); - } - - /// - /// Check whether the URL exists in the Domains list - /// - /// Url to lookup - /// If there is a wildcard (*) domain specified, return true? (Choose false to explicitly search for this url) - /// - public static bool DomainIsConfigured(string DomainUrl, bool AcceptWildcard = true) - { - bool ReturnValue = false; - - //Try to get domain from config file - DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; - - if (Domain != null) - { - ReturnValue = true; - } - else - { - if (AcceptWildcard) - { - DomainElement DomainWild = ConfigSettings.Settings.Domains["*"]; - if (DomainWild != null) - { - ReturnValue = true; - } - } - } - - return ReturnValue; - } - - /// - /// Get the Environment name for the current domain - /// - /// - public static string DomainEnvironmentName() - { - string ReturnValue = ""; - - //Get domain from config file - DomainElement Domain = ConfigSettings.Settings.Domains[CurrentDomain]; - - ReturnValue = Domain.Environment; - - return ReturnValue; - } - - /// - /// Get the Environment name for the provided domain url - /// - /// Url to lookup - /// - public static string DomainEnvironmentName(string DomainUrl) - { - string ReturnValue = ""; - - //Get domain from config file - DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; - - if (Domain != null) - { - ReturnValue = Domain.Environment; - } - else - { - //look for wildcard domain - DomainElement DomainWild = ConfigSettings.Settings.Domains["*"]; - if (DomainWild != null) - { - ReturnValue = DomainWild.Environment; - } - else - { - string ErrorMsg = string.Format("Domain '{0}' is not configured, and there is no wildcard (*) domain configured", DomainUrl); - throw new MissingDomainConfigException(ErrorMsg); - } - } - - return ReturnValue; - } - - /// - /// Get the Site Name for the current domain - /// - /// - public static string DomainSiteName() - { - string ReturnValue = ""; - - //Get domain from config file - DomainElement Domain = ConfigSettings.Settings.Domains[CurrentDomain]; - - ReturnValue = Domain.SiteName; - - return ReturnValue; - } - - /// - /// Get the Site Name for the provided domain url - /// - /// Url to lookup - /// - public static string DomainSiteName(string DomainUrl) - { - string ReturnValue = ""; - - //Get domain from config file - DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; - - if (Domain != null) - { - ReturnValue = Domain.SiteName; - } - else - { - //look for wildcard domain - DomainElement DomainWild = ConfigSettings.Settings.Domains["*"]; - if (DomainWild != null) - { - ReturnValue = DomainWild.SiteName; - } - else - { - string ErrorMsg = string.Format("Domain '{0}' is not configured, and there is no wildcard (*) domain configured", DomainUrl); - throw new MissingDomainConfigException(ErrorMsg); - } - } - - return ReturnValue; - } - - #endregion - - #region Environment Info - - /// - /// Check whether the current environment exists in the Environments list - /// - /// If there is a "default" domain specified, return true? (Choose false to explicitly search for this environment) - /// - public static bool EnvironmentIsConfigured(bool AcceptDefault = true) - { - return EnvironmentIsConfigured(DomainEnvironmentName(), AcceptDefault); - } - - /// - /// Check whether the current environment exists in the Environments list - /// - /// Name to lookup - /// If there is a "default" domain specified, return true? (Choose false to explicitly search for this environment) - /// - public static bool EnvironmentIsConfigured(string EnvironmentName, bool AcceptDefault = true) - { - bool ReturnValue = false; - - //Try to get the environment from config file - EnvironmentElement Env = ConfigSettings.Settings.Environments[EnvironmentName]; - - if (Env != null) - { - ReturnValue = true; - } - else - { - if (AcceptDefault) - { - EnvironmentElement EnvDefault = ConfigSettings.Settings.Environments["default"]; - if (EnvDefault != null) - { - ReturnValue = true; - } - } - } - - return ReturnValue; - } - - internal static EnvironmentElement GetDomainEnvironment(string DomainUrl) - { - string EnvName = ""; - try - { - //Get domain from config file - DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; - EnvName = Domain.Environment; - } - catch (Exception ) - { - try - { - DomainElement Domain = ConfigSettings.Settings.Domains["*"]; - EnvName = Domain.Environment; - } - catch (Exception Exception2) - { - string ErrorMsg = string.Format("Domain '{0}' is not configured, and there is no wildcard (*) domain configured", DomainUrl); - throw new MissingDomainConfigException(ErrorMsg, Exception2); - } - } - - if (EnvName != "") - { - EnvironmentElement ReturnValue = ConfigSettings.Settings.Environments[EnvName]; - return ReturnValue; - } - else - { - return null; - } - } - - internal static EnvironmentElement GetEnvironmentByName(string EnvironmentName) - { - EnvironmentElement ReturnValue; - - try - { - //Get environment from config file - ReturnValue = ConfigSettings.Settings.Environments[EnvironmentName]; - } - catch (Exception ) - { - try - { - //look for default environment - ReturnValue = ConfigSettings.Settings.Environments["default"]; - } - catch (Exception Exception2) - { - string ErrorMsg = string.Format("Environment '{0}' is not configured, and there is no 'default' environment configured", EnvironmentName); - throw new MissingEnvironmentConfigException(ErrorMsg, Exception2); - } - } - - return ReturnValue; - } - - #endregion - - #region Key/Value Configs - - /// - /// Get the value for a given key on the current domain - /// - /// Key name - /// - public static string GetValue(string ConfigKey) - { - string ReturnValue = ""; - ReturnValue = GetValue(ConfigKey, DomainEnvironmentName()); - - return ReturnValue; - } - - /// - /// Get the value when providing a key and environment name - /// - /// Key name - /// Environment name - /// - public static string GetValue(string ConfigKey, string EnvironmentName) - { - string ReturnValue = ""; - - //Get environment from config file - EnvironmentElement Env = GetEnvironmentByName(EnvironmentName); - - try - { - //find matching key - KeyValueElement KeyValue = Env.Configs[ConfigKey]; - - if (KeyValue != null) - { - ReturnValue = KeyValue.Value; - } - else - { - //Look for 'default' environment - EnvironmentElement EnvDefault = GetEnvironmentByName("default"); - - //find matching key - KeyValueElement KeyValueDefault = EnvDefault.Configs[ConfigKey]; - - ReturnValue = KeyValueDefault.Value; - } - } - catch (Exception Exception1) - { - string ErrorMsg = string.Format("Key '{0}' is not configured for Environment '{1}', and there is no default key configured", ConfigKey, EnvironmentName); - throw new MissingConfigKeyException(ErrorMsg, Exception1); - } - - return ReturnValue; - } - - - /// - /// Get all the KeyValue elements for the current Environment - /// - /// Include all ‘default’ KeyValue configs for keys not specifically defined for the environment. - /// - public static List AllEnvironmentConfigs(bool IncludeDefaults = true) - { - return AllEnvironmentConfigs(DomainEnvironmentName(), IncludeDefaults); - } - - /// - /// Get all the KeyValue elements for the current Environment - /// - /// Environment to get values from - /// Include all ‘default’ KeyValue configs for keys not specifically defined for the environment. - /// - public static List AllEnvironmentConfigs(string EnvironmentName, bool IncludeDefaults = true) - { - List ReturnList = new List(); - - EnvironmentElement Env = ConfigSettings.Settings.Environments[EnvironmentName]; - KeyValueElementCollection KvColl = Env.Configs; - - foreach (KeyValueElement KeyValue in Env.Configs) - { - ReturnList.Add(KeyValue); - } - - if (IncludeDefaults) - { - EnvironmentElement EnvDefault = ConfigSettings.Settings.Environments["default"]; - - foreach (KeyValueElement KeyValueDef in EnvDefault.Configs) - { - if (KvColl[KeyValueDef.Key]==null) - { - ReturnList.Add(KeyValueDef); - } - } - } - - return ReturnList; - } - - #endregion - - } - - #region *** Custom Exceptions *** - - [Serializable] - internal class MissingDomainConfigException : Exception - { - // Use the default ApplicationException constructors - public MissingDomainConfigException() : base() - { - } - - public MissingDomainConfigException(string s) : base(s) - { - } - - public MissingDomainConfigException(string s, Exception ex) : base(s, ex) - { - } - } - - [Serializable] - internal class MissingEnvironmentConfigException : Exception - { - // Use the default ApplicationException constructors - public MissingEnvironmentConfigException() : base() - { - } - - public MissingEnvironmentConfigException(string s) : base(s) - { - } - - public MissingEnvironmentConfigException(string s, Exception ex) : base(s, ex) - { - } - } - - [Serializable] - internal class MissingConfigKeyException : Exception - { - // Use the default ApplicationException constructors - public MissingConfigKeyException() : base() - { - } - - public MissingConfigKeyException(string s) : base(s) - { - } - - public MissingConfigKeyException(string s, Exception ex) : base(s, ex) - { - } - } - - #endregion - -} - +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web; + +namespace HLF.ContextConfig +{ + /// + /// The 'ContextConfig' static class includes useful functions to test and return data about domains, environments, and configured key/value pairs. + /// + public static class ContextConfig + { + + #region Domain Info + + /// + /// Current active domain url + /// + public static string CurrentDomain = HttpContext.Current.Request.ServerVariables["HTTP_HOST"].ToString(); + + /// + /// Check whether the current domain exists in the Domains list + /// + /// If there is a wildcard (*) domain specified, return true? (Choose false to explicitly search for this url) + /// + public static bool DomainIsConfigured(bool AcceptWildcard = true) + { + return DomainIsConfigured(CurrentDomain, AcceptWildcard); + } + + /// + /// Check whether the URL exists in the Domains list + /// + /// Url to lookup + /// If there is a wildcard (*) domain specified, return true? (Choose false to explicitly search for this url) + /// + public static bool DomainIsConfigured(string DomainUrl, bool AcceptWildcard = true) + { + bool ReturnValue = false; + + //Try to get domain from config file + DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; + + if (Domain != null) + { + ReturnValue = true; + } + else + { + if (AcceptWildcard) + { + DomainElement DomainWild = ConfigSettings.Settings.Domains["*"]; + if (DomainWild != null) + { + ReturnValue = true; + } + } + } + + return ReturnValue; + } + + /// + /// Get the Environment name for the current domain + /// + /// + public static string DomainEnvironmentName() + { + string ReturnValue = ""; + + //Get domain from config file + DomainElement Domain = ConfigSettings.Settings.Domains[CurrentDomain]; + + ReturnValue = Domain.Environment; + + return ReturnValue; + } + + /// + /// Get the Environment name for the provided domain url + /// + /// Url to lookup + /// + public static string DomainEnvironmentName(string DomainUrl) + { + string ReturnValue = ""; + + //Get domain from config file + DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; + + if (Domain != null) + { + ReturnValue = Domain.Environment; + } + else + { + //look for wildcard domain + DomainElement DomainWild = ConfigSettings.Settings.Domains["*"]; + if (DomainWild != null) + { + ReturnValue = DomainWild.Environment; + } + else + { + string ErrorMsg = string.Format("Domain '{0}' is not configured, and there is no wildcard (*) domain configured", DomainUrl); + throw new MissingDomainConfigException(ErrorMsg); + } + } + + return ReturnValue; + } + + /// + /// Get the Site Name for the current domain + /// + /// + public static string DomainSiteName() + { + string ReturnValue = ""; + + //Get domain from config file + DomainElement Domain = ConfigSettings.Settings.Domains[CurrentDomain]; + + ReturnValue = Domain.SiteName; + + return ReturnValue; + } + + /// + /// Get the Site Name for the provided domain url + /// + /// Url to lookup + /// + public static string DomainSiteName(string DomainUrl) + { + string ReturnValue = ""; + + //Get domain from config file + DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; + + if (Domain != null) + { + ReturnValue = Domain.SiteName; + } + else + { + //look for wildcard domain + DomainElement DomainWild = ConfigSettings.Settings.Domains["*"]; + if (DomainWild != null) + { + ReturnValue = DomainWild.SiteName; + } + else + { + string ErrorMsg = string.Format("Domain '{0}' is not configured, and there is no wildcard (*) domain configured", DomainUrl); + throw new MissingDomainConfigException(ErrorMsg); + } + } + + return ReturnValue; + } + + #endregion + + #region Environment Info + + /// + /// Check whether the current environment exists in the Environments list + /// + /// If there is a "default" domain specified, return true? (Choose false to explicitly search for this environment) + /// + public static bool EnvironmentIsConfigured(bool AcceptDefault = true) + { + return EnvironmentIsConfigured(DomainEnvironmentName(), AcceptDefault); + } + + /// + /// Check whether the current environment exists in the Environments list + /// + /// Name to lookup + /// If there is a "default" domain specified, return true? (Choose false to explicitly search for this environment) + /// + public static bool EnvironmentIsConfigured(string EnvironmentName, bool AcceptDefault = true) + { + bool ReturnValue = false; + + //Try to get the environment from config file + EnvironmentElement Env = ConfigSettings.Settings.Environments[EnvironmentName]; + + if (Env != null) + { + ReturnValue = true; + } + else + { + if (AcceptDefault) + { + EnvironmentElement EnvDefault = ConfigSettings.Settings.Environments["default"]; + if (EnvDefault != null) + { + ReturnValue = true; + } + } + } + + return ReturnValue; + } + + internal static EnvironmentElement GetDomainEnvironment(string DomainUrl) + { + string EnvName = ""; + try + { + //Get domain from config file + DomainElement Domain = ConfigSettings.Settings.Domains[DomainUrl]; + EnvName = Domain.Environment; + } + catch (Exception ) + { + try + { + DomainElement Domain = ConfigSettings.Settings.Domains["*"]; + EnvName = Domain.Environment; + } + catch (Exception Exception2) + { + string ErrorMsg = string.Format("Domain '{0}' is not configured, and there is no wildcard (*) domain configured", DomainUrl); + throw new MissingDomainConfigException(ErrorMsg, Exception2); + } + } + + if (EnvName != "") + { + EnvironmentElement ReturnValue = ConfigSettings.Settings.Environments[EnvName]; + return ReturnValue; + } + else + { + return null; + } + } + + internal static EnvironmentElement GetEnvironmentByName(string EnvironmentName) + { + EnvironmentElement ReturnValue; + + try + { + //Get environment from config file + ReturnValue = ConfigSettings.Settings.Environments[EnvironmentName]; + } + catch (Exception ) + { + try + { + //look for default environment + ReturnValue = ConfigSettings.Settings.Environments["default"]; + } + catch (Exception Exception2) + { + string ErrorMsg = string.Format("Environment '{0}' is not configured, and there is no 'default' environment configured", EnvironmentName); + throw new MissingEnvironmentConfigException(ErrorMsg, Exception2); + } + } + + return ReturnValue; + } + + #endregion + + #region Key/Value Configs + + /// + /// Get the value for a given key on the current domain + /// + /// Key name + /// + public static string GetValue(string ConfigKey) + { + string ReturnValue = ""; + ReturnValue = GetValue(ConfigKey, DomainEnvironmentName()); + + return ReturnValue; + } + + /// + /// Get the value when providing a key and environment name + /// + /// Key name + /// Environment name + /// + public static string GetValue(string ConfigKey, string EnvironmentName) + { + string ReturnValue = ""; + + //Get environment from config file + EnvironmentElement Env = GetEnvironmentByName(EnvironmentName); + + try + { + //find matching key + KeyValueElement KeyValue = Env.Configs[ConfigKey]; + + if (KeyValue != null) + { + ReturnValue = KeyValue.Value; + } + else + { + //Look for 'default' environment + EnvironmentElement EnvDefault = GetEnvironmentByName("default"); + + //find matching key + KeyValueElement KeyValueDefault = EnvDefault.Configs[ConfigKey]; + + ReturnValue = KeyValueDefault.Value; + } + } + catch (Exception Exception1) + { + string ErrorMsg = string.Format("Key '{0}' is not configured for Environment '{1}', and there is no default key configured", ConfigKey, EnvironmentName); + throw new MissingConfigKeyException(ErrorMsg, Exception1); + } + + return ReturnValue; + } + + + /// + /// Get all the KeyValue elements for the current Environment + /// + /// Include all ‘default’ KeyValue configs for keys not specifically defined for the environment. + /// + public static List AllEnvironmentConfigs(bool IncludeDefaults = true) + { + return AllEnvironmentConfigs(DomainEnvironmentName(), IncludeDefaults); + } + + /// + /// Get all the KeyValue elements for the current Environment + /// + /// Environment to get values from + /// Include all ‘default’ KeyValue configs for keys not specifically defined for the environment. + /// + public static List AllEnvironmentConfigs(string EnvironmentName, bool IncludeDefaults = true) + { + List ReturnList = new List(); + + EnvironmentElement Env = ConfigSettings.Settings.Environments[EnvironmentName]; + KeyValueElementCollection KvColl = Env.Configs; + + foreach (KeyValueElement KeyValue in Env.Configs) + { + ReturnList.Add(KeyValue); + } + + if (IncludeDefaults) + { + EnvironmentElement EnvDefault = ConfigSettings.Settings.Environments["default"]; + + foreach (KeyValueElement KeyValueDef in EnvDefault.Configs) + { + if (KvColl[KeyValueDef.Key]==null) + { + ReturnList.Add(KeyValueDef); + } + } + } + + return ReturnList; + } + + #endregion + + #region SMTP settings + /// + /// Get the SMTP Settings for the current domain + /// + /// Include all ‘default’ smtp configs for properties not specifically defined for the current domain. + /// + public static SmtpSettingsElement GetSmtpSettings(bool IncludeDefaults = true) + { + SmtpSettingsElement ReturnValue = null; + ReturnValue = GetSmtpSettings(DomainEnvironmentName(), IncludeDefaults); + + return ReturnValue; + } + + /// + /// Get the SMTP Settings for a given environment + /// + /// Environment to get smtp config from + /// Include all ‘default’ smtp configs for properties not specifically defined for the current domain. + /// + public static SmtpSettingsElement GetSmtpSettings(string EnvironmentName, bool IncludeDefaults = true) + { + SmtpSettingsElement ReturnValue = new SmtpSettingsElement(); + + EnvironmentElement Env = ConfigSettings.Settings.Environments[EnvironmentName]; + EnvironmentElement DefaultEnv = ConfigSettings.Settings.Environments["default"]; + + // fills the return value with the values from the requested environment + if (Env != null) + FillUndefinedSmtpSettings(ReturnValue, Env.SmtpSettings); + // fills the still undefined properties of the return value with the values from the default environment + if (DefaultEnv != null) + FillUndefinedSmtpSettings(ReturnValue, DefaultEnv.SmtpSettings); + + return ReturnValue; + } + + /// + /// Performs a property per property fill of undefined properties of an SmtpSettingsElement based on the values of another one + /// + /// The SmtpSettingsElement to fill + /// The SmtpSettingsElement to get values from + private static void FillUndefinedSmtpSettings(SmtpSettingsElement Target, SmtpSettingsElement Source) + { + if (Target.IsPropertyUndefined("defaultCredentials") && !Source.IsPropertyUndefined("defaultCredentials")) + Target.Network = Source.Network; + } + #endregion + } + + #region *** Custom Exceptions *** + + [Serializable] + internal class MissingDomainConfigException : Exception + { + // Use the default ApplicationException constructors + public MissingDomainConfigException() : base() + { + } + + public MissingDomainConfigException(string s) : base(s) + { + } + + public MissingDomainConfigException(string s, Exception ex) : base(s, ex) + { + } + } + + [Serializable] + internal class MissingEnvironmentConfigException : Exception + { + // Use the default ApplicationException constructors + public MissingEnvironmentConfigException() : base() + { + } + + public MissingEnvironmentConfigException(string s) : base(s) + { + } + + public MissingEnvironmentConfigException(string s, Exception ex) : base(s, ex) + { + } + } + + [Serializable] + internal class MissingConfigKeyException : Exception + { + // Use the default ApplicationException constructors + public MissingConfigKeyException() : base() + { + } + + public MissingConfigKeyException(string s) : base(s) + { + } + + public MissingConfigKeyException(string s, Exception ex) : base(s, ex) + { + } + } + + #endregion + +} + diff --git a/Source/TestSite/Default.aspx.cs b/Source/TestSite/Default.aspx.cs index 757965d..cf1b5f0 100644 --- a/Source/TestSite/Default.aspx.cs +++ b/Source/TestSite/Default.aspx.cs @@ -1,268 +1,309 @@ -using System; -using System.Configuration; -using System.Configuration.Internal; -using System.Reflection; -using HLF.ContextConfig; - -namespace TestSite -{ - public partial class Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - Response.Write("Hello!

"); - - Response.Write("

All Configuration Data

"); - Response.Write("

(Using the 'ConfigSettings' class)

"); - WriteData(); - Response.Write("
"); - - Response.Write("

Testing Functions

"); - Response.Write("

(Using the 'ContextConfig' class)

"); - LookupStuff(); - Response.Write("
"); - - Response.Write("

Testing Web.config Override

"); - Response.Write("

(Using the 'ContextConfigOverride' class)

"); - TestConfigOverride(); - Response.Write("
"); - } - - private void WriteData() - { - string Version = ConfigSettings.Settings.Version; - Response.Write(string.Format("Version: {0}
", Version)); - Response.Write("
"); - - int DomainsCount = ConfigSettings.Settings.Domains.Count; - Response.Write(string.Format("Total Domains: {0}
", DomainsCount)); - - int d = 0; - foreach (DomainElement Domain in ConfigSettings.Settings.Domains) - { - Response.Write(string.Format("Domain {0} : {1} = {2} ({3})
", d, Domain.Url, Domain.Environment, Domain.SiteName)); - d++; - } - Response.Write("
"); - - int EnvironmentsCount = ConfigSettings.Settings.Environments.Count; - Response.Write(string.Format("Total Environments: {0}
", EnvironmentsCount)); - - int e = 0; - foreach (EnvironmentElement Env in ConfigSettings.Settings.Environments) - { - Response.Write(string.Format("Environment {0} : {1}
", e, Env.Name)); - e++; - - int ConfigsCount = Env.Configs.Count; - Response.Write(string.Format("ConfigsCount: {0}
    ", ConfigsCount)); - - int c = 0; - foreach (KeyValueElement KeyValue in Env.Configs) - { - Response.Write(string.Format("
  • {0} = {1}
  • ", KeyValue.Key, KeyValue.Value)); - c++; - } - Response.Write("
"); - } - Response.Write("
"); - - } - - private void LookupStuff() - { - try - { - string B = ContextConfig.CurrentDomain; - Response.Write(string.Format("ContextConfig.CurrentDomain = {0}
", B)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string D = ContextConfig.DomainIsConfigured().ToString(); - Response.Write(string.Format("ContextConfig.DomainIsConfigured() = {0}
", D)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - - string F = ContextConfig.DomainIsConfigured("xyz.com").ToString(); - Response.Write(string.Format("ContextConfig.DomainIsConfigured(\"xyz.com\") = {0}
", F)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string G = ContextConfig.DomainIsConfigured("xyz.com", false).ToString(); - Response.Write(string.Format("ContextConfig.DomainIsConfigured(\"xyz.com\", false) = {0}
", G)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string E = ContextConfig.DomainEnvironmentName(); - Response.Write(string.Format("ContextConfig.DomainEnvironmentName() = {0}
", E)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string H = ContextConfig.DomainEnvironmentName("xyz.com"); - Response.Write(string.Format("ContextConfig.DomainEnvironmentName(\"xyz.com\") = {0}
", H)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - Response.Write("
"); - - try - { - string E = ContextConfig.DomainSiteName(); - Response.Write(string.Format("ContextConfig.DomainSiteName() = {0}
", E)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string H = ContextConfig.DomainSiteName("xyz.com"); - Response.Write(string.Format("ContextConfig.DomainSiteName(\"xyz.com\") = {0}
", H)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - Response.Write("
"); - - try - { - string I = ContextConfig.EnvironmentIsConfigured().ToString(); - Response.Write(string.Format("ContextConfig.EnvironmentIsConfigured() = {0}
", I)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string I = ContextConfig.DomainEnvironmentName().ToString(); - Response.Write(string.Format("ContextConfig.DomainEnvironmentName() = {0}
", I)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string J = ContextConfig.EnvironmentIsConfigured("testing").ToString(); - Response.Write(string.Format("ContextConfig.EnvironmentIsConfigured(\"testing\") = {0}
", J)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string K = ContextConfig.EnvironmentIsConfigured("testing", false).ToString(); - Response.Write(string.Format("ContextConfig.EnvironmentIsConfigured(\"testing\", false) = {0}
", K)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - Response.Write("
"); - - try - { - string C = ContextConfig.GetValue("MyAppKey"); - Response.Write(string.Format("ContextConfig.GetValue(\"MyAppKey\") = {0}
", C)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string A = ContextConfig.GetValue("MyAppKey", "dev"); - Response.Write(string.Format("ContextConfig.GetValue(\"MyAppKey\", \"dev\") = {0}
", A)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string L = ContextConfig.GetValue("LiveOnlyAppKey", "live"); - Response.Write(string.Format("ContextConfig.GetValue(\"LiveOnlyAppKey\", \"live\") = {0}
", L)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string M = ContextConfig.GetValue("LiveOnlyAppKey"); - Response.Write(string.Format("ContextConfig.GetValue(\"LiveOnlyAppKey\") = {0}
", M)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - try - { - string N = ContextConfig.GetValue("KeyThatDoesntExist"); - Response.Write("Here we throw an error intentionally:"); - Response.Write(string.Format("ContextConfig.GetValue(\"KeyThatDoesntExist\") = {0}
", N)); - } - catch (Exception Ex) - { - Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); - } - - } - - private void TestConfigOverride() - { - Response.Write(string.Format("'OverrideConfigurationManager' value in config = {0}
", ConfigSettings.Settings.OverrideConfigurationManager)); - - // test it - string Test = ConfigurationManager.AppSettings["OverrideTest"]; - Response.Write(string.Format("OverrideTest = {0}
", Test)); - - // test missing value - string TestNull = ConfigurationManager.AppSettings["NoKey"]; - Response.Write(string.Format("Missing Key = {0}
", TestNull)); - - } - } +using System; +using System.Configuration; +using System.Configuration.Internal; +using System.Reflection; +using HLF.ContextConfig; + +namespace TestSite +{ + public partial class Default : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + Response.Write("Hello!

"); + + Response.Write("

All Configuration Data

"); + Response.Write("

(Using the 'ConfigSettings' class)

"); + WriteData(); + Response.Write("
"); + + Response.Write("

Testing Functions

"); + Response.Write("

(Using the 'ContextConfig' class)

"); + LookupStuff(); + Response.Write("
"); + + Response.Write("

Testing Web.config Override

"); + Response.Write("

(Using the 'ContextConfigOverride' class)

"); + TestConfigOverride(); + Response.Write("
"); + + } + + private void WriteData() + { + string Version = ConfigSettings.Settings.Version; + Response.Write(string.Format("Version: {0}
", Version)); + Response.Write("
"); + + int DomainsCount = ConfigSettings.Settings.Domains.Count; + Response.Write(string.Format("Total Domains: {0}
", DomainsCount)); + + int d = 0; + foreach (DomainElement Domain in ConfigSettings.Settings.Domains) + { + Response.Write(string.Format("Domain {0} : {1} = {2} ({3})
", d, Domain.Url, Domain.Environment, Domain.SiteName)); + d++; + } + Response.Write("
"); + + int EnvironmentsCount = ConfigSettings.Settings.Environments.Count; + Response.Write(string.Format("Total Environments: {0}
", EnvironmentsCount)); + + int e = 0; + foreach (EnvironmentElement Env in ConfigSettings.Settings.Environments) + { + Response.Write(string.Format("Environment {0} : {1}
", e, Env.Name)); + e++; + + int ConfigsCount = Env.Configs.Count; + Response.Write(string.Format("ConfigsCount: {0}
    ", ConfigsCount)); + + int c = 0; + foreach (KeyValueElement KeyValue in Env.Configs) + { + Response.Write(string.Format("
  • {0} = {1}
  • ", KeyValue.Key, KeyValue.Value)); + c++; + } + Response.Write("
"); + + Response.Write("SMTP Settings
    "); + var smtpSettings = Env.SmtpSettings; + Response.Write(string.Format("
  • From = {0}
  • ", smtpSettings.From)); + Response.Write(string.Format("
  • Delivery Method = {0}
  • ", smtpSettings.DeliveryMethod)); + Response.Write(string.Format("
  • Delivery Format = {0}
  • ", smtpSettings.DeliveryFormat)); + Response.Write(string.Format("
  • Use Default Credentials = {0}
  • ", smtpSettings.Network.UseDefaultCredentials)); + Response.Write(string.Format("
  • Enable SSL = {0}
  • ", smtpSettings.Network.EnableSsl)); + Response.Write(string.Format("
  • Host = {0}
  • ", smtpSettings.Network.Host)); + Response.Write(string.Format("
  • Port = {0}
  • ", smtpSettings.Network.Port)); + Response.Write(string.Format("
  • Client Domain = {0}
  • ", smtpSettings.Network.ClientDomain)); + Response.Write(string.Format("
  • User Name = {0}
  • ", smtpSettings.Network.UserName)); + Response.Write(string.Format("
  • Password = {0}
  • ", smtpSettings.Network.Password)); + Response.Write(string.Format("
  • Target Name = {0}
  • ", smtpSettings.Network.TargetName)); + Response.Write(string.Format("
  • Pickup Directory Location = {0}
  • ", smtpSettings.SpecifiedPickupDirectory.PickupDirectoryLocation)); + Response.Write("
"); + + } + Response.Write("
"); + } + + private void LookupStuff() + { + try + { + string B = ContextConfig.CurrentDomain; + Response.Write(string.Format("ContextConfig.CurrentDomain = {0}
", B)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string D = ContextConfig.DomainIsConfigured().ToString(); + Response.Write(string.Format("ContextConfig.DomainIsConfigured() = {0}
", D)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + + string F = ContextConfig.DomainIsConfigured("xyz.com").ToString(); + Response.Write(string.Format("ContextConfig.DomainIsConfigured(\"xyz.com\") = {0}
", F)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string G = ContextConfig.DomainIsConfigured("xyz.com", false).ToString(); + Response.Write(string.Format("ContextConfig.DomainIsConfigured(\"xyz.com\", false) = {0}
", G)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string E = ContextConfig.DomainEnvironmentName(); + Response.Write(string.Format("ContextConfig.DomainEnvironmentName() = {0}
", E)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string H = ContextConfig.DomainEnvironmentName("xyz.com"); + Response.Write(string.Format("ContextConfig.DomainEnvironmentName(\"xyz.com\") = {0}
", H)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + Response.Write("
"); + + try + { + string E = ContextConfig.DomainSiteName(); + Response.Write(string.Format("ContextConfig.DomainSiteName() = {0}
", E)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string H = ContextConfig.DomainSiteName("xyz.com"); + Response.Write(string.Format("ContextConfig.DomainSiteName(\"xyz.com\") = {0}
", H)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + Response.Write("
"); + + try + { + string I = ContextConfig.EnvironmentIsConfigured().ToString(); + Response.Write(string.Format("ContextConfig.EnvironmentIsConfigured() = {0}
", I)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string I = ContextConfig.DomainEnvironmentName().ToString(); + Response.Write(string.Format("ContextConfig.DomainEnvironmentName() = {0}
", I)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string J = ContextConfig.EnvironmentIsConfigured("testing").ToString(); + Response.Write(string.Format("ContextConfig.EnvironmentIsConfigured(\"testing\") = {0}
", J)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string K = ContextConfig.EnvironmentIsConfigured("testing", false).ToString(); + Response.Write(string.Format("ContextConfig.EnvironmentIsConfigured(\"testing\", false) = {0}
", K)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + Response.Write("
"); + + try + { + string C = ContextConfig.GetValue("MyAppKey"); + Response.Write(string.Format("ContextConfig.GetValue(\"MyAppKey\") = {0}
", C)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string A = ContextConfig.GetValue("MyAppKey", "dev"); + Response.Write(string.Format("ContextConfig.GetValue(\"MyAppKey\", \"dev\") = {0}
", A)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string L = ContextConfig.GetValue("LiveOnlyAppKey", "live"); + Response.Write(string.Format("ContextConfig.GetValue(\"LiveOnlyAppKey\", \"live\") = {0}
", L)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string M = ContextConfig.GetValue("LiveOnlyAppKey"); + Response.Write(string.Format("ContextConfig.GetValue(\"LiveOnlyAppKey\") = {0}
", M)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + string N = ContextConfig.GetValue("KeyThatDoesntExist"); + Response.Write("Here we throw an error intentionally:"); + Response.Write(string.Format("ContextConfig.GetValue(\"KeyThatDoesntExist\") = {0}
", N)); + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + + try + { + SmtpSettingsElement smtpSettings = ContextConfig.GetSmtpSettings(); + + Response.Write("SMTP Settings
    "); + Response.Write(string.Format("
  • From = {0}
  • ", smtpSettings.From)); + Response.Write(string.Format("
  • Delivery Method = {0}
  • ", smtpSettings.DeliveryMethod)); + Response.Write(string.Format("
  • Delivery Format = {0}
  • ", smtpSettings.DeliveryFormat)); + Response.Write(string.Format("
  • Use Default Credentials = {0}
  • ", smtpSettings.Network.UseDefaultCredentials)); + Response.Write(string.Format("
  • Enable SSL = {0}
  • ", smtpSettings.Network.EnableSsl)); + Response.Write(string.Format("
  • Host = {0}
  • ", smtpSettings.Network.Host)); + Response.Write(string.Format("
  • Port = {0}
  • ", smtpSettings.Network.Port)); + Response.Write(string.Format("
  • Client Domain = {0}
  • ", smtpSettings.Network.ClientDomain)); + Response.Write(string.Format("
  • User Name = {0}
  • ", smtpSettings.Network.UserName)); + Response.Write(string.Format("
  • Password = {0}
  • ", smtpSettings.Network.Password)); + Response.Write(string.Format("
  • Target Name = {0}
  • ", smtpSettings.Network.TargetName)); + Response.Write(string.Format("
  • Pickup Directory Location = {0}
  • ", smtpSettings.SpecifiedPickupDirectory.PickupDirectoryLocation)); + Response.Write("
"); + + } + catch (Exception Ex) + { + Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); + } + } + + private void TestConfigOverride() + { + Response.Write(string.Format("'OverrideConfigurationManager' value in config = {0}
", ConfigSettings.Settings.OverrideConfigurationManager)); + + // test it + string Test = ConfigurationManager.AppSettings["OverrideTest"]; + Response.Write(string.Format("OverrideTest = {0}
", Test)); + + // test missing value + string TestNull = ConfigurationManager.AppSettings["NoKey"]; + Response.Write(string.Format("Missing Key = {0}
", TestNull)); + + } + } } \ No newline at end of file diff --git a/Source/TestSite/Web.config b/Source/TestSite/Web.config index 0b3265e..8ef3c12 100644 --- a/Source/TestSite/Web.config +++ b/Source/TestSite/Web.config @@ -16,12 +16,16 @@ - + + + + + From aee3be84d3abfd50cdfedd17662a8780f85128a0 Mon Sep 17 00:00:00 2001 From: Michael Latouche Date: Tue, 8 Sep 2015 00:06:13 +0200 Subject: [PATCH 2/2] smtp integration --- Solution/build-bin/HLF.ContextConfig.dll | Bin 20480 -> 23040 bytes Solution/build-bin/HLF.ContextConfig.pdb | Bin 60928 -> 67072 bytes Solution/build-config/ContextConfig.config | 18 +- Source/HLF.ContextConfig/ConfigSettings.cs | 155 ++++++++++++------ Source/HLF.ContextConfig/ContextConfig.config | 18 +- Source/HLF.ContextConfig/ContextConfig.cs | 39 ++++- Source/TestSite/Default.aspx.cs | 20 ++- Source/TestSite/Web.config | 2 + 8 files changed, 184 insertions(+), 68 deletions(-) diff --git a/Solution/build-bin/HLF.ContextConfig.dll b/Solution/build-bin/HLF.ContextConfig.dll index 0d19edc710fa54c03fc9a2b07c9f631f6f8a3345..92ebcebef88e1b981baa31aef20924bcff0ab12f 100644 GIT binary patch delta 6437 zcmbVR3v^WFo&SH|ow;-Gop%!QfB=&RWb&FMgb+vo6OsS{NfSa+l=_HCgqV;?XM!A5 zoX~Ak5Ke(!wR8`ydRRT8tAYWx+V#PL9H{a1ptYsq^Qc>~m9EyuvJ1Mu@0*(;5l(x~ zX3qWH@AvyZzQ_F@cP2v*vY|t4*Vb&u@84}B>+fCSSx)98S_wgoiwg&KKi2N~C`{BU zgdw7n%I>UW*MmeZ@B{rsnPwI*GOuHKMtw7+0IrqhJ#3oiq=MoQE*q{@<`I_1R-13L z?2Nzw1pF<<#mP>`D~bLxhlrW}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z_9}jXF4?PjHL7k4cq5A z)I5-+9I&Dc!r@xr3E^>uCp*kANLa zZvC|+w|o>*lv{i)$*sMXZdzm3UHrT@> z74#mGDrmSGwPZ-y4Xgn7G*4Y?(6Uvu6!-B4>o6;|>)`p=I~{hpT}IXHly|*#oSpYR zU@=_la?FI;tDe006|xCSrJ0^(oR%uCP`q35&-82rfyb5DuDAmX(JUI`3ejzJGuTSM z1?%VsD@5svV-)YCrSQ9{6aGZ{0xTj2JR>Os%uzXI@K@7Xwu?7|`}i90bG{w?h93Z( zj>u`8(j69C%SJc~z&Va;aG9eSyc=`2mObv+%If&1`c^iPlfE6EmmT|H`;C3de*(6{ zJfZBgn5~_T;8d*w^# zx@r7qd}f|DzcnwKn$^q7u=1@ktIBGyR#!oh&yJ6;r{h z{ez@G-5B;ifm+pIIunl-PK|KNqJ9{1HvTyE$K*1+Bj&=+QOw1=BQ_*_c{l~I3^=S} zuntGL297YweN6;AJW05iz;ZZam zu5!iER1Le5CW2$|n#qxIBXY)p9KWdX?c`P5*)DfPMgx=YWa4sBW7n);wkD33=83dH zdC5)l+io7$5?(~om^8obcj1=Xs8uW&w6LG_j9J(`e{ow?cu`~XVwF*}}dyuZ7;V_Ti? zVf)rg;#AcOiOwuaD3&M%{6Q^?G0}Hiy6MOw(-9z3_{YEMbHdAIC}F8I&8|C=hfm1tt01- z-maZIT`=In7S?rqGTL`HAvg9pBJHdV*~$E1lSrO2L3pQ*^2~8u2@}l`GpClh?_>j$ z+?NBG26p2=VkKTWlSq&j?oB>oLnDI}xp~UzPz`98I diff --git a/Solution/build-bin/HLF.ContextConfig.pdb b/Solution/build-bin/HLF.ContextConfig.pdb index 040f598836eee2c9958e5eef4060debaa6adf35e..b908ff3915e89b9b8b996a34624cd9d66cb6be96 100644 GIT binary patch delta 15697 zcmc&*d3;sH^`Co__sGlsl9wH_2a*6GdqUU}mJk9$Py%5~6G%eBmW4$?G(p8;n_|eZ z7;q_CwPFE*r{VDvuXYRb02ce%@{o^;-n8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eV^h=s25@~7h@S;z@j|NcCfZ;Am0Mnegv8Cr3@RUqc5sI$7w7GTmzV? y;D=N>hX!5gNqu81Cf<+Ry~QyJ(!^ghC(ul1qPLfMhcwlqSce_u<&dUw+rI%@zJjR$ diff --git a/Solution/build-config/ContextConfig.config b/Solution/build-config/ContextConfig.config index d22601f..e79fa11 100644 --- a/Solution/build-config/ContextConfig.config +++ b/Solution/build-config/ContextConfig.config @@ -23,9 +23,9 @@ - - - + + + @@ -33,9 +33,9 @@ - - - + + + @@ -47,13 +47,17 @@ + + + - + + diff --git a/Source/HLF.ContextConfig/ConfigSettings.cs b/Source/HLF.ContextConfig/ConfigSettings.cs index 5735f97..a12def8 100644 --- a/Source/HLF.ContextConfig/ConfigSettings.cs +++ b/Source/HLF.ContextConfig/ConfigSettings.cs @@ -232,9 +232,9 @@ internal bool IsPropertyUndefined(string PropertyName) { var property = this.ElementInformation.Properties[PropertyName]; - return property == null || property.ValueOrigin == PropertyValueOrigin.Default; + return property == null || property.ValueOrigin != PropertyValueOrigin.SetHere; } - } + } /// /// Represents the SmtpSettings defined for an environment in the config file @@ -242,7 +242,8 @@ internal bool IsPropertyUndefined(string PropertyName) public class SmtpSettingsElement : SmtpConfigurationElement { #region const - internal const string DeliveryMethodPropertyName = "deliveryMethod"; + internal const string DeliveryMethodPropertyName = "deliveryMethod", DeliveryFormatPropertyName = "deliveryFormat", FromPropertyName = "from"; + protected const string NetworkPropertyName = "network", SpecifiedPickupDirectoryPropertyName = "specifiedPickupDirectory"; #endregion @@ -260,21 +261,29 @@ public System.Net.Mail.SmtpDeliveryMethod DeliveryMethod return (System.Net.Mail.SmtpDeliveryMethod)base[DeliveryMethodPropertyName]; } + set + { + base[DeliveryMethodPropertyName] = value; + } } /// /// <SmtpSettings> 'deliveryFormat' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("deliveryFormat", IsRequired = false)] + [ConfigurationProperty(DeliveryFormatPropertyName, IsRequired = false)] public System.Net.Mail.SmtpDeliveryFormat DeliveryFormat { get { - if (IsPropertyUndefined("deliveryFormat")) + if (IsPropertyUndefined(DeliveryFormatPropertyName)) return SmtpDefaults.DeliveryFormat; // return default value - return (System.Net.Mail.SmtpDeliveryFormat)base["deliveryFormat"]; + return (System.Net.Mail.SmtpDeliveryFormat)base[DeliveryFormatPropertyName]; + } + set + { + base[DeliveryFormatPropertyName] = value; } } @@ -282,12 +291,12 @@ public System.Net.Mail.SmtpDeliveryFormat DeliveryFormat /// <SmtpSettings> 'from' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("from", IsRequired = false)] + [ConfigurationProperty(FromPropertyName, IsRequired = false)] public string From { get { - if (IsPropertyUndefined("from")) + if (IsPropertyUndefined(FromPropertyName)) { // return default value, if provided var defaultFrom = new System.Net.Mail.MailMessage().From; @@ -295,7 +304,11 @@ public string From return defaultFrom.Address; // we have a default from address } - return (string)base["from"]; + return (string)base[FromPropertyName]; + } + set + { + base[FromPropertyName] = value; } } @@ -303,16 +316,12 @@ public string From /// <SmtpSettings> 'network' element. /// Defaults to the base smtp network settings value if not provided in this config section. /// - [ConfigurationProperty("network", IsRequired = false)] + [ConfigurationProperty(NetworkPropertyName, IsRequired = false)] public SmtpNetworkElement Network { get { - return (SmtpNetworkElement)base["network"]; - } - set - { - this["network"] = value; + return (SmtpNetworkElement)base[NetworkPropertyName]; } } @@ -320,10 +329,10 @@ public SmtpNetworkElement Network /// <SmtpSettings> 'specifiedPickupDirectory' element. /// Defaults to the base smtp specifiedPickupDirectory settings value if not provided in this config section. /// - [ConfigurationProperty("specifiedPickupDirectory", IsRequired = false)] + [ConfigurationProperty(SpecifiedPickupDirectoryPropertyName, IsRequired = false)] public SmtpSpecifiedPickupDirectoryElement SpecifiedPickupDirectory { - get { return (SmtpSpecifiedPickupDirectoryElement)base["specifiedPickupDirectory"]; } + get { return (SmtpSpecifiedPickupDirectoryElement)base[SpecifiedPickupDirectoryPropertyName]; } } } @@ -332,27 +341,37 @@ public SmtpSpecifiedPickupDirectoryElement SpecifiedPickupDirectory /// public class SmtpNetworkElement : SmtpConfigurationElement { + #region const + internal const string ClientDomainPropertyName = "clientDomain", UserNamePropertyName = "userName", PasswordPropertyName = "password", + DefaultCredentialsPropertyName = "defaultCredentials", EnableSslPropertyName = "enableSsl", HostPropertyName = "host", + PortPropertyName = "port", TargetNamePropertyName = "targetName"; + #endregion + /// /// <Network> 'clientDomain' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("clientDomain", IsRequired = false)] + [ConfigurationProperty(ClientDomainPropertyName, IsRequired = false)] public string ClientDomain { get { if (UseDefaultCredentials) return string.Empty; - - if (IsPropertyUndefined("clientDomain")) + + if (IsPropertyUndefined(ClientDomainPropertyName)) { var defaultCredentials = (System.Net.NetworkCredential)SmtpDefaults.Credentials; if (defaultCredentials != null) return defaultCredentials.Domain; } - - return (string)base["clientDomain"]; + + return (string)base[ClientDomainPropertyName]; + } + set + { + base[ClientDomainPropertyName] = value; } } @@ -360,15 +379,15 @@ public string ClientDomain /// <Network> 'userName' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("userName", IsRequired = false)] + [ConfigurationProperty(UserNamePropertyName, IsRequired = false)] public string UserName { get { if (UseDefaultCredentials) return string.Empty; - - if (IsPropertyUndefined("userName")) + + if (IsPropertyUndefined(UserNamePropertyName)) { var defaultCredentials = (System.Net.NetworkCredential)SmtpDefaults.Credentials; @@ -376,7 +395,11 @@ public string UserName return defaultCredentials.UserName; } - return (string)base["userName"]; + return (string)base[UserNamePropertyName]; + } + set + { + base[UserNamePropertyName] = value; } } @@ -384,7 +407,7 @@ public string UserName /// <Network> 'password' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("password", IsRequired = false)] + [ConfigurationProperty(PasswordPropertyName, IsRequired = false)] public string Password { get @@ -392,15 +415,19 @@ public string Password if (UseDefaultCredentials) return string.Empty; - if (IsPropertyUndefined("password")) + if (IsPropertyUndefined(PasswordPropertyName)) { var defaultCredentials = (System.Net.NetworkCredential)SmtpDefaults.Credentials; if (defaultCredentials != null) return defaultCredentials.Password; } - - return (string)base["password"]; + + return (string)base[PasswordPropertyName]; + } + set + { + base[PasswordPropertyName] = value; } } @@ -408,15 +435,19 @@ public string Password /// <Network> 'defaultCredentials' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("defaultCredentials", IsRequired = false)] + [ConfigurationProperty(DefaultCredentialsPropertyName, IsRequired = false)] public bool UseDefaultCredentials { get { - if (IsPropertyUndefined("defaultCredentials")) + if (IsPropertyUndefined(DefaultCredentialsPropertyName)) return SmtpDefaults.UseDefaultCredentials; - - return (bool)base["defaultCredentials"]; + + return (bool)base[DefaultCredentialsPropertyName]; + } + set + { + base[DefaultCredentialsPropertyName] = value; } } @@ -424,15 +455,19 @@ public bool UseDefaultCredentials /// <Network> 'enableSsl' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("enableSsl", IsRequired = false)] + [ConfigurationProperty(EnableSslPropertyName, IsRequired = false)] public bool EnableSsl { get { - if (IsPropertyUndefined("enableSsl")) + if (IsPropertyUndefined(EnableSslPropertyName)) return SmtpDefaults.EnableSsl; - return (bool)base["enableSsl"]; + return (bool)base[EnableSslPropertyName]; + } + set + { + base[EnableSslPropertyName] = value; } } @@ -440,15 +475,19 @@ public bool EnableSsl /// <Network> 'host' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("host", IsRequired = false)] + [ConfigurationProperty(HostPropertyName, IsRequired = false)] public string Host { get { - if (IsPropertyUndefined("host")) + if (IsPropertyUndefined(HostPropertyName)) return SmtpDefaults.Host; - - return (string)base["host"]; + + return (string)base[HostPropertyName]; + } + set + { + base[HostPropertyName] = value; } } @@ -456,15 +495,19 @@ public string Host /// <Network> 'port' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("port", IsRequired = false)] + [ConfigurationProperty(PortPropertyName, IsRequired = false)] public int Port { get { - if (IsPropertyUndefined("port")) + if (IsPropertyUndefined(PortPropertyName)) return SmtpDefaults.Port; - return (int)base["port"]; + return (int)base[PortPropertyName]; + } + set + { + base[PortPropertyName] = value; } } @@ -472,15 +515,19 @@ public int Port /// <Network> 'targetName' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("targetName", IsRequired = false)] + [ConfigurationProperty(TargetNamePropertyName, IsRequired = false)] public string TargetName { get { - if (IsPropertyUndefined("targetName")) + if (IsPropertyUndefined(TargetNamePropertyName)) return SmtpDefaults.TargetName; - return (string)base["targetName"]; + return (string)base[TargetNamePropertyName]; + } + set + { + base[TargetNamePropertyName] = value; } } } @@ -490,19 +537,27 @@ public string TargetName /// public class SmtpSpecifiedPickupDirectoryElement : SmtpConfigurationElement { + #region const + internal const string PickupDirectoryLocationPropertyName = "pickupDirectoryLocation"; + #endregion + /// /// <SpecifiedPickupDirectory> 'pickupDirectoryLocation' attribute. /// Defaults to the base smtp settings value if not provided in this config section. /// - [ConfigurationProperty("pickupDirectoryLocation", IsRequired = false)] + [ConfigurationProperty(PickupDirectoryLocationPropertyName, IsRequired = false)] public string PickupDirectoryLocation { get { - if (IsPropertyUndefined("pickupDirectoryLocation")) + if (IsPropertyUndefined(PickupDirectoryLocationPropertyName)) return SmtpDefaults.PickupDirectoryLocation; - return (string)base["pickupDirectoryLocation"]; + return (string)base[PickupDirectoryLocationPropertyName]; + } + set + { + base[PickupDirectoryLocationPropertyName] = value; } } } diff --git a/Source/HLF.ContextConfig/ContextConfig.config b/Source/HLF.ContextConfig/ContextConfig.config index d22601f..e79fa11 100644 --- a/Source/HLF.ContextConfig/ContextConfig.config +++ b/Source/HLF.ContextConfig/ContextConfig.config @@ -23,9 +23,9 @@ - - - + + + @@ -33,9 +33,9 @@ - - - + + + @@ -47,13 +47,17 @@ + + + - + + diff --git a/Source/HLF.ContextConfig/ContextConfig.cs b/Source/HLF.ContextConfig/ContextConfig.cs index 62451ac..2fc0c29 100644 --- a/Source/HLF.ContextConfig/ContextConfig.cs +++ b/Source/HLF.ContextConfig/ContextConfig.cs @@ -406,7 +406,7 @@ public static SmtpSettingsElement GetSmtpSettings(string EnvironmentName, bool I if (Env != null) FillUndefinedSmtpSettings(ReturnValue, Env.SmtpSettings); // fills the still undefined properties of the return value with the values from the default environment - if (DefaultEnv != null) + if (IncludeDefaults && DefaultEnv != null) FillUndefinedSmtpSettings(ReturnValue, DefaultEnv.SmtpSettings); return ReturnValue; @@ -419,8 +419,41 @@ public static SmtpSettingsElement GetSmtpSettings(string EnvironmentName, bool I /// The SmtpSettingsElement to get values from private static void FillUndefinedSmtpSettings(SmtpSettingsElement Target, SmtpSettingsElement Source) { - if (Target.IsPropertyUndefined("defaultCredentials") && !Source.IsPropertyUndefined("defaultCredentials")) - Target.Network = Source.Network; + if (Target.IsPropertyUndefined(SmtpSettingsElement.DeliveryFormatPropertyName) && !Source.IsPropertyUndefined(SmtpSettingsElement.DeliveryFormatPropertyName)) + Target.DeliveryFormat= Source.DeliveryFormat; + + if (Target.IsPropertyUndefined(SmtpSettingsElement.DeliveryMethodPropertyName) && !Source.IsPropertyUndefined(SmtpSettingsElement.DeliveryMethodPropertyName)) + Target.DeliveryMethod= Source.DeliveryMethod; + + if (Target.IsPropertyUndefined(SmtpSettingsElement.FromPropertyName) && !Source.IsPropertyUndefined(SmtpSettingsElement.FromPropertyName)) + Target.From = Source.From; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.ClientDomainPropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.ClientDomainPropertyName)) + Target.Network.ClientDomain = Source.Network.ClientDomain; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.DefaultCredentialsPropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.DefaultCredentialsPropertyName)) + Target.Network.UseDefaultCredentials = Source.Network.UseDefaultCredentials; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.EnableSslPropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.EnableSslPropertyName)) + Target.Network.EnableSsl = Source.Network.EnableSsl; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.HostPropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.HostPropertyName)) + Target.Network.Host = Source.Network.Host; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.PasswordPropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.PasswordPropertyName)) + Target.Network.Password = Source.Network.Password; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.PortPropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.PortPropertyName)) + Target.Network.Port = Source.Network.Port; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.TargetNamePropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.TargetNamePropertyName)) + Target.Network.TargetName = Source.Network.TargetName; + + if (Target.Network.IsPropertyUndefined(SmtpNetworkElement.UserNamePropertyName) && !Source.Network.IsPropertyUndefined(SmtpNetworkElement.UserNamePropertyName)) + Target.Network.UserName = Source.Network.UserName; + + if (Target.SpecifiedPickupDirectory.IsPropertyUndefined(SmtpSpecifiedPickupDirectoryElement.PickupDirectoryLocationPropertyName) && !Source.SpecifiedPickupDirectory.IsPropertyUndefined(SmtpSpecifiedPickupDirectoryElement.PickupDirectoryLocationPropertyName)) + Target.SpecifiedPickupDirectory.PickupDirectoryLocation = Source.SpecifiedPickupDirectory.PickupDirectoryLocation; } #endregion } diff --git a/Source/TestSite/Default.aspx.cs b/Source/TestSite/Default.aspx.cs index cf1b5f0..e4263d0 100644 --- a/Source/TestSite/Default.aspx.cs +++ b/Source/TestSite/Default.aspx.cs @@ -266,11 +266,13 @@ private void LookupStuff() Response.Write(string.Format("ERROR: {0} : {1}
", Ex.GetType().ToString(), Ex.Message)); } + Response.Write("
"); + try { SmtpSettingsElement smtpSettings = ContextConfig.GetSmtpSettings(); - Response.Write("SMTP Settings
    "); + Response.Write("SMTP Settings with default
      "); Response.Write(string.Format("
    • From = {0}
    • ", smtpSettings.From)); Response.Write(string.Format("
    • Delivery Method = {0}
    • ", smtpSettings.DeliveryMethod)); Response.Write(string.Format("
    • Delivery Format = {0}
    • ", smtpSettings.DeliveryFormat)); @@ -285,6 +287,22 @@ private void LookupStuff() Response.Write(string.Format("
    • Pickup Directory Location = {0}
    • ", smtpSettings.SpecifiedPickupDirectory.PickupDirectoryLocation)); Response.Write("
    "); + smtpSettings = ContextConfig.GetSmtpSettings(false); + + Response.Write("SMTP Settings without default
      "); + Response.Write(string.Format("
    • From = {0}
    • ", smtpSettings.From)); + Response.Write(string.Format("
    • Delivery Method = {0}
    • ", smtpSettings.DeliveryMethod)); + Response.Write(string.Format("
    • Delivery Format = {0}
    • ", smtpSettings.DeliveryFormat)); + Response.Write(string.Format("
    • Use Default Credentials = {0}
    • ", smtpSettings.Network.UseDefaultCredentials)); + Response.Write(string.Format("
    • Enable SSL = {0}
    • ", smtpSettings.Network.EnableSsl)); + Response.Write(string.Format("
    • Host = {0}
    • ", smtpSettings.Network.Host)); + Response.Write(string.Format("
    • Port = {0}
    • ", smtpSettings.Network.Port)); + Response.Write(string.Format("
    • Client Domain = {0}
    • ", smtpSettings.Network.ClientDomain)); + Response.Write(string.Format("
    • User Name = {0}
    • ", smtpSettings.Network.UserName)); + Response.Write(string.Format("
    • Password = {0}
    • ", smtpSettings.Network.Password)); + Response.Write(string.Format("
    • Target Name = {0}
    • ", smtpSettings.Network.TargetName)); + Response.Write(string.Format("
    • Pickup Directory Location = {0}
    • ", smtpSettings.SpecifiedPickupDirectory.PickupDirectoryLocation)); + Response.Write("
    "); } catch (Exception Ex) { diff --git a/Source/TestSite/Web.config b/Source/TestSite/Web.config index 8ef3c12..dcdcbdd 100644 --- a/Source/TestSite/Web.config +++ b/Source/TestSite/Web.config @@ -24,6 +24,8 @@ + +