summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Messaging/Configuration
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.Messaging/Configuration')
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs3
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs5
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
index af9d45b..87e335c 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
@@ -41,7 +41,8 @@ namespace DotNetOpenAuth.Configuration {
public static DotNetOpenAuthSection Configuration {
get {
Contract.Ensures(Contract.Result<DotNetOpenAuthSection>() != null);
- return (DotNetOpenAuthSection)ConfigurationManager.GetSection(SectionName) ?? new DotNetOpenAuthSection();
+ var configuration = ConfigurationManager.OpenExeConfiguration(null);
+ return (DotNetOpenAuthSection)configuration.GetSectionGroup(SectionName);
}
}
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
index 42ab0eb..397c97d 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
@@ -68,7 +68,7 @@ namespace DotNetOpenAuth.Configuration {
/// <summary>
/// The name of the &lt;messaging&gt; sub-element.
/// </summary>
- private const string MessagingElementName = DotNetOpenAuthSection.SectionName + "/messaging";
+ private const string MessagingElementName = "messaging";
/// <summary>
/// Gets the configuration section from the .config file.
@@ -76,7 +76,7 @@ namespace DotNetOpenAuth.Configuration {
public static MessagingElement Configuration {
get {
Contract.Ensures(Contract.Result<MessagingElement>() != null);
- return (MessagingElement)ConfigurationManager.GetSection(MessagingElementName) ?? new MessagingElement();
+ return (MessagingElement)DotNetOpenAuthSection.Configuration.Sections[MessagingElementName] ?? new MessagingElement();
}
}
@@ -200,6 +200,7 @@ namespace DotNetOpenAuth.Configuration {
/// <value>
/// The embedded resource retrieval provider.
/// </value>
+ [ConfigurationProperty(WebResourceUrlProviderName)]
internal TypeConfigurationElement<IEmbeddedResourceRetrieval> EmbeddedResourceRetrievalProvider {
get { return (TypeConfigurationElement<IEmbeddedResourceRetrieval>)this[WebResourceUrlProviderName] ?? new TypeConfigurationElement<IEmbeddedResourceRetrieval>(); }
set { this[WebResourceUrlProviderName] = value; }
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs
index a8eb7d3..4011ba5 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs
@@ -77,7 +77,7 @@ namespace DotNetOpenAuth.Configuration {
public static ReportingElement Configuration {
get {
Contract.Ensures(Contract.Result<ReportingElement>() != null);
- return (ReportingElement)ConfigurationManager.GetSection(ReportingElementName) ?? new ReportingElement();
+ return (ReportingElement)DotNetOpenAuthSection.Configuration.Sections[ReportingElementName] ?? new ReportingElement();
}
}