diff options
Diffstat (limited to 'src/OpenID/OpenIdProviderMvc/Code/Util.cs')
-rw-r--r-- | src/OpenID/OpenIdProviderMvc/Code/Util.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/OpenID/OpenIdProviderMvc/Code/Util.cs b/src/OpenID/OpenIdProviderMvc/Code/Util.cs new file mode 100644 index 0000000..6623952 --- /dev/null +++ b/src/OpenID/OpenIdProviderMvc/Code/Util.cs @@ -0,0 +1,17 @@ +namespace OpenIdProviderMvc.Code { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Web; + + internal static class Util { + internal static Uri GetAppPathRootedUri(string value) { + string appPath = HttpContext.Current.Request.ApplicationPath.ToLowerInvariant(); + if (!appPath.EndsWith("/")) { + appPath += "/"; + } + + return new Uri(HttpContext.Current.Request.Url, appPath + value); + } + } +} |