Request.UrlReferrer.AbsoluteUri losing HTTPS navigation

TheMatrix

Member
Joined
Feb 15, 2008
Messages
14
Programming Experience
5-10
Hi All,

I am facing a weird problem with HTTPS and Request.Url.AbsoluteUri in my
ASP.NET application. Here is the scenario -
1. I have a page call Authentication.aspx using this URL https://NHWB032/ClientAccount/EN/Authentication.aspx
On the page i have a menu that enables you to navigate to the same page but in a different language (French).

When clicking the language link i navigate to http://NHWB032/ClientAccount/FR/Authentication.aspx

and i am using Request.Url.AbsoluteUri to know on which page i am since i have more than 1 page containing the language menu.

If you notice between the 2 links Request.Url.AbsoluteUri got change from HTTPS to HTTP

PROBLEM - the result has HTTP instead of HTTPS!!!!!

Has anybody faced a similar problem or has some insight into what could be
going wrong and could anybody give me the best resolution to this problem i.e.:Change the code, Change settings on the server and IIS.etc.?

Thanks for your help!
 
The same goes for Request.Url, Https configured pages can only be loaded by a Https schema url, Http only by Http schema. But this is not a code issue or something you check for in code, view the page in browser (you know the url) and you'll see if it configured for Http or Https.
 
Back
Top