summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdProviderMvc/Code/Util.cs
blob: c9ec56a0951962a8a5c146c54dff7b2e6ef887d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
		}

	}
}