Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 13 of 13

Thread: Infinite Redirect Loop When Going From non-SSL to SSL

  1. #1
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default Infinite Redirect Loop When Going From non-SSL to SSL

    Hey all,

    I'm trying to get things up and running in a cloud environment.

    With the great support of Jon and ASPDNSF support, I have things up and running.

    The trouble for me now is that when I click on Add To Cart, Login, or any other cart function, I get a redirect loop error.

    I previously thought this was when going from non-SSL to SSL but it also occurs when you are browsing in SSL and then add to cart or try to login.

    So I think it's really doing the loop when something active takes place in the storefront (adding something to cart, requesting a login page, etc).

    Any ideas on how to fix this?

    Thanks.
    Philip
    Last edited by sspmurphy; 01-29-2009 at 11:14 PM. Reason: More information

  2. #2
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    I'm solving this exact problem right now. I don't have a timeframe yet for a fix.

    The issue is that an SSL channel is used between the shoppers browser and Mosso's load balancer. At that point, the load balancer forwards the request to a specific IIS cluster (via an internal secure network on port 80), with the server variable "HTTP_CLUSTER_HTTPS" set to "on" (a Mosso-specific variable). Outbound response traffic from that IIS cluster hits the load balancer, and travels back out the existing SSL channel to the shopper.
    Jon Wolthuis

  3. #3
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default

    Thanks Jon! If you make any headway I'd love to know.

    Thanks very much for your help.
    Philip

  4. #4
    fsantos is offline Senior Member
    Join Date
    Feb 2007
    Posts
    244

    Default

    Quick question guys: do you happen to use Microsoft ISA Firewall?

    I've seen this problem before with ISA Server and I have the solution

    Maybe you want to PM me in case you're using Microsoft ISA Server. It has nothing to do with AspdotnetStorefront...

    fsantos

  5. #5
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default

    I don't think I have the ability to PM you on here. Can you post the solution? Is it the one about setting the path to itself? I don't have access to IIS. The host is Mosso.

    Thanks!

  6. #6
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default Partial Fix

    Hey Jon,

    The following code added to AppLogic.cs lets me add product to the cart on Mosso but it does not switch to https: Any ideas?
    Code:
    String s = "http://" + CommonLogic.ServerVariables("HTTP_HOST") + ScriptLocation;
                if (TryToUseSSL && AppLogic.UseSSL() && AppLogic.OnLiveServer())
                {
                    if ((AppLogic.AppConfig("SharedSSLLocation").Length == 0) && (CommonLogic.ServerVariables("HTTP_CLUSTER_HTTPS") == "on"))
                    {
                        s = s.Replace("http:/", "https:/");
                        if (AppLogic.RedirectLiveToWWW())
                        {
                            if (s.IndexOf("https://www") == -1)
                            {
                                s = s.Replace("https://", "https://www.");
                            }
                            s = s.Replace("www.www", "www"); // safety check
    If I manually switch to https it also works now even if something is in the cart. It's just a matter of switching automatically. Not sure how to proceed.
    Last edited by sspmurphy; 02-03-2009 at 04:23 PM.

  7. #7
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    We'll have support for Mosso in the next release

  8. #8
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default

    Awesome! I think that is great. Any timeframe on that release? Or any idea on how to modify the code above to make it work for 8.0? If it's coming out soon, I'll probably back burner this and just use the new build. Thanks for implementing support for them.

  9. #9
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    New release is being posted (C# and non-source) today. VB will be available probably tomorrow.

  10. #10
    sspmurphy is offline Member
    Join Date
    Feb 2007
    Posts
    86

    Default

    Thank you very much!

  11. #11
    sethian is offline Junior Member
    Join Date
    Feb 2009
    Posts
    2

    Default Infinite login loop with SSL enabled

    I am having a very similar problem but I am not using Mosso.

    I have enabled forced login for my site using:

    <deny users="?"/>

    in Web.config. This properly displays the login page when anybody hits the site. However, when a valid login is provided the site confirms login is ok, redirecting, and then I end back at the login page. This becomes an infinite loop.

    I noticed this thread and I've found that if I turn off SSL everything works correctly.

    Any ideas?

    Thanks,
    Paul

  12. #12
    rheadrick is offline Junior Member
    Join Date
    Dec 2009
    Posts
    2

    Default

    I'm having this same problem. We just upgraded to ISA Server 2006 and everything works fine except when clicking on the shopping cart or adding to the shopping cart. The page times out with too many server redirects and number of HTTP requests per minute.

    It works fine in ISA 2000 though. Any thoughts or update on this problem?

  13. #13
    tbrown is offline Junior Member
    Join Date
    Jul 2010
    Posts
    1

    Default Did this get resolved?

    I have a similar problem and I was wondering if a solution had been found.