Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. HttpContext Context = HttpContext.Current;
  2. value = "http://localhost" + Context.Request.RawUrl;
  3.  
  4. // Gets the base url in the following format:
  5. // "http(s)://domain(:port)/AppPath"
  6. HttpContext.Current.Request.Url.Scheme
  7. + "://"
  8. + HttpContext.Current.Request.Url.Authority
  9. + HttpContext.Current.Request.ApplicationPath;
  10.  
  11. var baseUri = new Uri(HttpContext.Current.Request.Url, "/");
  12.  
  13. string loginUrl = Request.Url.GetLeftPart(UriPartial.Authority) + VirtualPathUtility.ToAbsolute("~/") + "Login/Login.aspx?UserName=" + LoggedinUser["UserName"] + "&Password=" + LoggedinUser["Password"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement