How to automatically change from httpS to http for a specific folder??

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default How to automatically change from httpS to http for a specific folder??


    There are great instructions on the web for force HTTPS for specific folder

    How to automatically change from http to https for a specific folde
    [url]http://www.iisfaq.com/default.aspx?View=A407&P=2[/url]

    But, my question would be ...

    Question
    ========
    I am trying to set up a website with the following requirements

    1. User can browse through the non-secure pages of the website usin
    ordinary HTTP
    2. User can access the secure pages by first supplying a username an
    password through a web form via SSL. This web-form goes throug
    HTTPS. The idea is to encrypt the password as it's sent across th
    net
    3. Once the user has logged in, he can browse through the rest of th
    site using ordinary HTTP

    I have been able to achieve #1 and #2, but as soon as the user log
    in, he can only browse through the site using HTTPS. Is there a wa
    to configure IIS so that once the user has logged in via SSL, he ca
    browse through the rest of the site using HTTP

    Note: all of the links in my HTML are "relative" links, except for th
    link to my login page, which is an "absolute" link that explicitl
    uses "https"

    Answer from other threads (Can't there be better solution?
    ======================================
    This is an application issue, not an IIS issue. The page that processe
    your web form should be written such that the user is redirected to HTT
    once the authentication process is complete. In most cases, th
    authentication function would store the original request and send the use
    to [url]http://site.com/orig_request[/url] once the login has been verified

    ======================================
    If this is the only solution, all of the pages in the website would have to have the exact link (HTTP or HTTPS) specified and I
    do not think this is a good approach

    Thanks a lot.
    Po-Shan Chang Guest

  2. Similar Questions and Discussions

    1. Switching Between HTTP and HTTPS
      Hi I wish to have a web site that has most of the pages as normal HTTP pages but has some areas that use HTTPS. I want to have it that if a user...
    2. http to https
      Is there a coldfusion function that determines the gives me the protocol of the address bar(http, https) .I tried GetHttpRequestData, but I do not...
    3. Automatically toggle between https and http
      Hi, Is this possible: Have a seperate folder that just contains the aspx webforms that you require to run under SSL https. (Set IIS directory...
    4. HTTPS to HTTP
      When I am using server-side button to switch from https to http by using response.redirect "http://a.apsx" in response to the client event, I am...
    5. Switching to and from http and https
      hello all. currently, this is how a line of my form is setup (names have been changed to protect the innocent ;) <form...
  3. #2

    Default Re: How to automatically change from httpS to http for a specific folder??

    The response from other thread is the way to do it.
    but only on the page redirecting user from https to http

    just like how you redirect the one page from http to https,
    same way, but the other direction.

    --
    Regards,
    Bernard Cheah
    [url]http://support.microsoft.com/[/url]
    Please respond to newsgroups only ...


    "Po-Shan Chang" <poshanchang@yahoo.com> wrote in message
    news:47C5A88E-41D2-49D9-875D-E0B4E6547660@microsoft.com...
    >
    > There are great instructions on the web for force HTTPS for specific
    folder.
    >
    > How to automatically change from http to https for a specific folder
    > [url]http://www.iisfaq.com/default.aspx?View=A407&P=20[/url]
    >
    > But, my question would be ....
    >
    > Question:
    > =========
    > I am trying to set up a website with the following requirements:
    >
    > 1. User can browse through the non-secure pages of the website using
    > ordinary HTTP.
    > 2. User can access the secure pages by first supplying a username and
    > password through a web form via SSL. This web-form goes through
    > HTTPS. The idea is to encrypt the password as it's sent across the
    > net.
    > 3. Once the user has logged in, he can browse through the rest of the
    > site using ordinary HTTP.
    >
    > I have been able to achieve #1 and #2, but as soon as the user logs
    > in, he can only browse through the site using HTTPS. Is there a way
    > to configure IIS so that once the user has logged in via SSL, he can
    > browse through the rest of the site using HTTP?
    >
    > Note: all of the links in my HTML are "relative" links, except for the
    > link to my login page, which is an "absolute" link that explicitly
    > uses "https".
    >
    > Answer from other threads (Can't there be better solution?)
    > =======================================
    > This is an application issue, not an IIS issue. The page that processes
    > your web form should be written such that the user is redirected to HTTP
    > once the authentication process is complete. In most cases, the
    > authentication function would store the original request and send the user
    > to [url]http://site.com/orig_request[/url] once the login has been verified.
    >
    > =======================================
    > If this is the only solution, all of the pages in the website would have
    to have the exact link (HTTP or HTTPS) specified and I
    > do not think this is a good approach.
    >
    > Thanks a lot.

    Bernard Guest

  4. #3

    Default Re: How to automatically change from httpS to http for a specific folder??

    I created an http to https flipper which will automatically flip from http to https and back again for either all pages on your site or certain pages. Have a look at my blog post for more info (source code can be downloaded)

    http://jonlanceley.blogspot.com/2011/07/http-to-https-flipper-for-aspnet-web.html
    Jon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139