diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-10 21:07:58 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-11-10 21:07:58 -0800 |
commit | 8576d3e52d930d4a784ba26ecfba9b79ecef2076 (patch) | |
tree | 61e1893c7143590bcceae7778fd51b54a4c7746c /samples/OAuthServiceProvider/App_Code/Global.cs | |
parent | 6df46c9875f82f5a5f94a082a0b699fde2978d6f (diff) | |
download | DotNetOpenAuth-8576d3e52d930d4a784ba26ecfba9b79ecef2076.zip DotNetOpenAuth-8576d3e52d930d4a784ba26ecfba9b79ecef2076.tar.gz DotNetOpenAuth-8576d3e52d930d4a784ba26ecfba9b79ecef2076.tar.bz2 |
Fixed calculation of web root in the OAuth SP sample.
Diffstat (limited to 'samples/OAuthServiceProvider/App_Code/Global.cs')
-rw-r--r-- | samples/OAuthServiceProvider/App_Code/Global.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/samples/OAuthServiceProvider/App_Code/Global.cs b/samples/OAuthServiceProvider/App_Code/Global.cs index b343dcd..8b8ba21 100644 --- a/samples/OAuthServiceProvider/App_Code/Global.cs +++ b/samples/OAuthServiceProvider/App_Code/Global.cs @@ -92,7 +92,11 @@ public class Global : HttpApplication { private void Application_Start(object sender, EventArgs e) { log4net.Config.XmlConfigurator.Configure(); Logger.Info("Sample starting..."); - Constants.WebRootUrl = new Uri(HttpContext.Current.Request.Url, "/"); + string appPath = HttpContext.Current.Request.ApplicationPath; + if (!appPath.EndsWith("/")) { + appPath += "/"; + } + Constants.WebRootUrl = new Uri(appPath); var tokenManager = new DatabaseTokenManager(); Global.TokenManager = tokenManager; } |