diff options
-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; } |