code_junkie

Web server changed name, url return wrong host name

Nov 13th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. finalUrl = "https://" + Request.Url.Host + "/home.aspx";
  2.  
  3. https://server0/home.aspx
  4.  
  5. Host stackoverflow.com
  6. User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729)
  7. Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  8. ...
  9.  
  10. string finalUrl = "~/home.aspx";
  11. Response.Redirect(finalUrl);
Add Comment
Please, Sign In to add comment