Friday, May 6, 2016

When your load balancer is stripping the s off of https in what it presents to you...

You can't just get dependable URLs from an app for "itself" (links back to itself in emails sent and the like) like so:

Request.Url.ToString().ToLower().Split('?')[0].Replace("/yourimmediatething.aspx","");

 
 

The base URL is going to need to be a setting somewhere in the Web.config or the database or something. Don't try to just replace http:// universal with https:// as you'll find this makes it impossible to test in dev. It's time to stop being clever and start hacking.

No comments:

Post a Comment