summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-03 06:10:25 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-03 07:42:26 -0700
commit36485a484848e60138796dd4fd6814cce60375a7 (patch)
tree8f3a7fc2921716e476d151edd1132d2651879dd5
parentb6860a7c11e39a29aa2f5758eca7f076a4d7ebe9 (diff)
downloadDotNetOpenAuth-36485a484848e60138796dd4fd6814cce60375a7.zip
DotNetOpenAuth-36485a484848e60138796dd4fd6814cce60375a7.tar.gz
DotNetOpenAuth-36485a484848e60138796dd4fd6814cce60375a7.tar.bz2
Fixed OP sample's assumption that it isn't working in a virtual directory.
-rw-r--r--samples/OpenIdProviderWebForms/Code/Util.cs2
-rw-r--r--samples/OpenIdProviderWebForms/user.aspx.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/samples/OpenIdProviderWebForms/Code/Util.cs b/samples/OpenIdProviderWebForms/Code/Util.cs
index 5cec951..6493e67 100644
--- a/samples/OpenIdProviderWebForms/Code/Util.cs
+++ b/samples/OpenIdProviderWebForms/Code/Util.cs
@@ -28,7 +28,7 @@ namespace OpenIdProviderWebForms.Code {
// be sure to normalize case the way the user's identity page does.
username = username.Substring(0, 1).ToUpperInvariant() + username.Substring(1).ToLowerInvariant();
- return new Uri(HttpContext.Current.Request.Url, "/user/" + username);
+ return new Uri(HttpContext.Current.Request.Url, HttpContext.Current.Response.ApplyAppPathModifier("~/user/" + username));
}
internal static void ProcessAuthenticationChallenge(IAuthenticationRequest idrequest) {
diff --git a/samples/OpenIdProviderWebForms/user.aspx.cs b/samples/OpenIdProviderWebForms/user.aspx.cs
index f530f15..63eb1d6 100644
--- a/samples/OpenIdProviderWebForms/user.aspx.cs
+++ b/samples/OpenIdProviderWebForms/user.aspx.cs
@@ -25,7 +25,7 @@ namespace OpenIdProviderWebForms {
UriBuilder normalized = new UriBuilder(e.UserSuppliedIdentifier);
string username = Request.QueryString["username"].TrimEnd('/').ToLowerInvariant();
username = username.Substring(0, 1).ToUpperInvariant() + username.Substring(1);
- normalized.Path = "/user/" + username;
+ normalized.Path = Response.ApplyAppPathModifier("~/user/" + username);
normalized.Scheme = "http"; // for a real Provider, this should be HTTPS if supported.
e.NormalizedIdentifier = normalized.Uri;
}