Expand|Select|Wrap|Line Numbers
- string url = Request.Url.AbsoluteUri.ToLower();
- //not logged in code path snippet
- if (!url.Contains("default.aspx") | !url.Contains("cookietest.aspx") | !url.Contains("nondisclosure.aspx") | !url.Contains("errorpage.aspx"))
- {
- //only redirect if user is not on the default, nondisclosure or cookie page..
- Response.Redirect("default.aspx", false);
- }
If I attempt to go to the default.aspx page, it causes an infinite loop. It's almost like the code is not seeing the ! in front of the url.contains..
So basically i'm saying.. If NOT URL.CONTAINS... OR... If NOT URL.CONTAINS..
So.. I've debugged and the URL DOES contain default.aspx.. yet it still redirects..