https Redirection not working in Vista IE7

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kmdshuaib
    New Member
    • Feb 2008
    • 1

    https Redirection not working in Vista IE7

    Hi,
    I have created a web application, and i need the total web site to be in https. So i have written the below code in the Page Init of the Master Page to automatically redirect the site from http to https (http://myserver.com to https://www.myserver.co m ).

    public void Page_Init(Objec t O, EventArgs e)
    {
    if(this.Request .Url.Scheme.Equ als(Uri.UriSche meHttps))
    {
    if(this.Request .Url.Authority. ToString().ToLo wer() != "www.myserver.c om")
    {
    Response.Redire ct(Uri.UriSchem eHttps + Uri.SchemeDelim iter +"www."+ this.Request.Ur l.Authority + this.Request.Ur l.PathAndQuery) ;
    }
    }
    else
    {
    if(this.Request .Url.Authority. ToString().ToLo wer() != "www.myserver.c om")
    {
    Response.Redire ct(Uri.UriSchem eHttps + Uri.SchemeDelim iter +"www."+ this.Request.Ur l.Authority + this.Request.Ur l.PathAndQuery) ;
    }
    else
    {
    Response.Redire ct(Uri.UriSchem eHttps + Uri.SchemeDelim iter + this.Request.Ur l.Authority + this.Request.Ur l.PathAndQuery) ;
    }
    }
    }




    This code works fine with IE6 and IE7. but when i tried to work with Vista IE7 am not able to view the page.. Am getting the below security error message
    There is a problem with this website's security certificate.




    This organization's certificate has been revoked.

    Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.



    But when i removed the above coding from the master page, it works fine with vista IE7 also, but this will not solve problem as i need to run my entire website in https. So anybody please help me how do i solve this problem in Window Vista IExplorer.



    Regards

    KMS
Working...