summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-09-02 08:09:51 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-09-02 08:09:51 -0700
commit9fc9ea9307ef61fcdfb985b2c284f58db7425335 (patch)
tree99406cf005747d998cfe79f09fb13348aa8101e3 /src
parent5bbc58f7f6399aadbd524c69fea7cc4926b24283 (diff)
downloadDotNetOpenAuth-9fc9ea9307ef61fcdfb985b2c284f58db7425335.zip
DotNetOpenAuth-9fc9ea9307ef61fcdfb985b2c284f58db7425335.tar.gz
DotNetOpenAuth-9fc9ea9307ef61fcdfb985b2c284f58db7425335.tar.bz2
Only the OAuth appendix test is failing.
Web sites still work.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs29
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs2
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs2
-rw-r--r--src/DotNetOpenAuth.Messaging/Messaging/Bindings/INonceStore.cs2
4 files changed, 11 insertions, 24 deletions
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
index e784c7e..70c8cce 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/DotNetOpenAuthSection.cs
@@ -51,25 +51,6 @@ namespace DotNetOpenAuth.Configuration {
}
/// <summary>
- /// Gets the configuration section from the .config file.
- /// </summary>
- public static DotNetOpenAuthSection Configuration {
- get {
- Contract.Ensures(Contract.Result<DotNetOpenAuthSection>() != null);
- Configuration configuration;
- if (HttpContext.Current != null) {
- configuration = HttpContext.Current.Request.ApplicationPath != null
- ? WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath)
- : ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
- } else {
- configuration = ConfigurationManager.OpenExeConfiguration(null);
- }
-
- return (DotNetOpenAuthSection)configuration.GetSectionGroup(SectionName) ?? new DotNetOpenAuthSection(true);
- }
- }
-
- /// <summary>
/// Gets the messaging configuration element.
/// </summary>
public static MessagingElement Messaging {
@@ -86,8 +67,14 @@ namespace DotNetOpenAuth.Configuration {
/// <summary>
/// Gets a named section in this section group, or <c>null</c> if no such section is defined.
/// </summary>
- internal ConfigurationSection GetNamedSection(string name) {
- return this.synthesizedInstance ? null : this.Sections[name];
+ internal static ConfigurationSection GetNamedSection(string name) {
+ string fullyQualifiedSectionName = SectionName + "/" + name;
+ if (HttpContext.Current != null) {
+ return (ConfigurationSection)WebConfigurationManager.GetSection(fullyQualifiedSectionName);
+ } else {
+ var configuration = ConfigurationManager.OpenExeConfiguration(null);
+ return configuration != null ? configuration.GetSection(fullyQualifiedSectionName) : null;
+ }
}
}
}
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
index 83fd9f6..35d0bd5 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/MessagingElement.cs
@@ -76,7 +76,7 @@ namespace DotNetOpenAuth.Configuration {
public static MessagingElement Configuration {
get {
Contract.Ensures(Contract.Result<MessagingElement>() != null);
- return (MessagingElement)DotNetOpenAuthSection.Configuration.GetNamedSection(MessagingElementName) ?? new MessagingElement();
+ return (MessagingElement)DotNetOpenAuthSection.GetNamedSection(MessagingElementName) ?? new MessagingElement();
}
}
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/ReportingElement.cs
index a4cd99d..e36c6ac 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)DotNetOpenAuthSection.Configuration.GetNamedSection(ReportingElementName) ?? new ReportingElement();
+ return (ReportingElement)DotNetOpenAuthSection.GetNamedSection(ReportingElementName) ?? new ReportingElement();
}
}
diff --git a/src/DotNetOpenAuth.Messaging/Messaging/Bindings/INonceStore.cs b/src/DotNetOpenAuth.Messaging/Messaging/Bindings/INonceStore.cs
index 6b6e2e1..7a3e8bb 100644
--- a/src/DotNetOpenAuth.Messaging/Messaging/Bindings/INonceStore.cs
+++ b/src/DotNetOpenAuth.Messaging/Messaging/Bindings/INonceStore.cs
@@ -31,7 +31,7 @@ namespace DotNetOpenAuth.Messaging.Bindings {
/// be processed within before being discarded as an expired message.
/// This maximum message age can be looked up via the
/// <see cref="DotNetOpenAuth.Configuration.MessagingElement.MaximumMessageLifetime"/>
- /// property, accessible via the <see cref="DotNetOpenAuth.Configuration.DotNetOpenAuthSection.Configuration"/>
+ /// property, accessible via the <see cref="DotNetOpenAuth.Configuration.MessagingElement.Configuration"/>
/// property.
/// </remarks>
bool StoreNonce(string context, string nonce, DateTime timestampUtc);