Hi,
I want HTTPS for only login.aspx , and for all other pages normal http.
void Application_BeginRequest(object sender, EventArgs e)
{
var absolutepath = Request.Url.AbsolutePath;
var ext = System.IO.Path.GetExtension(Request.Url.AbsolutePath);
if (absolutepath.Contains("login.aspx") || absolutepath.ToLower().Contains("webresource.axd") || ext.ToLower() == ".png" || ext.ToLower() == ".css" || ext.ToLower() == ".js" || ext.ToLower() == ".jpg" || ext.ToLower() == ".gif")
{
if (HttpContext.Current.Request.Url.ToString().ToLower().Contains("http:"))
{
Response.Redirect(HttpContext.Current.Request.Url.ToString().ToLower().Replace("http:", "https:"));
}
}
else
{
...
Go to the complete details ...