« Previous Next »

Thread: ARR & Firefox Cookie

Last post 06-08-2009 3:03 AM by PawanM. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 06-03-2009, 3:03 AM

    • PawanM
    • Not Ranked
    • Joined on 06-03-2009, 2:39 AM
    • Posts 4

    ARR & Firefox Cookie

    I am unable to set & read cookie in mozilla firefox  after configuring ARR. The same set of code is working fine with IE browsers. Basically I am setting a cookie for some domain & the cookie is not available in Firefox. I changed the url bindings at server side & put ipaddress instead of domain name, then it works fine both in IE & Firefox, but this is not the solution I am looking for.

    Please suggest me a cleaner approach.

  • 06-03-2009, 9:17 AM In reply to

    • PawanM
    • Not Ranked
    • Joined on 06-03-2009, 2:39 AM
    • Posts 4

    Re: ARR & Firefox Cookie

    Issue resolved after bringing the second server online in web farm. I am still wondering why this happened when there was only one active server in farm & only with Firefox browser.  It might be either ARR bug or its feature restriction. I'll be thankful if someone put more specs on that.
  • 06-03-2009, 11:50 AM In reply to

    • wonyoo
    • Top 50 Contributor
    • Joined on 12-15-2007, 6:46 PM
    • Posts 125

    Re: ARR & Firefox Cookie

    The number of active servers in the server farm does not impact whether the cookies are set or not.

    Are these cookies that are being set by ARR or by your application?  Have you done the network traces to see what request and response headers are being set to ensure that the right cookies are being set? 

  • 06-05-2009, 7:21 AM In reply to

    • PawanM
    • Not Ranked
    • Joined on 06-03-2009, 2:39 AM
    • Posts 4

    Re: ARR & Firefox Cookie

    We are setting the cookies through our application only.  Yea I checked the cookies, it is available in case of IE, Chrome but not for Firefox. As soon as I make my second server online, cookies are avaialble in firefox too.  I think it is the matter of request header values. Firefox is not able to read the cookies neatly when it is redirected through ARR server.

  • 06-05-2009, 12:52 PM In reply to

    • wonyoo
    • Top 50 Contributor
    • Joined on 12-15-2007, 6:46 PM
    • Posts 125

    Re: ARR & Firefox Cookie

    I am not able to repro the problem that you are reporting.

    Here is my setup.  I have an ARR server with one server in the server farm.

    I am using a very simple asp page to set the cookie, like shown below:

    <%
    Response.buffer = True
    Response.Cookies("testcookie") = "Hello"
    Response.Cookies("testcookie").Path = "/"
    %>

    Using Firefox version 3.0.10, I can clear see the cookie being set from the origin server:


    - Http: Response, HTTP/1.1, Status Code = 200, URL: /cookietest.asp
        ProtocolVersion: HTTP/1.1
        StatusCode: 200, Ok
        Reason: OK
        Cache-Control:  private
        ContentLength:  0
        ContentType:  text/html
        Server:  Microsoft-IIS/7.0
        Set-Cookie:  testcookie=Hello; path=/
        Set-Cookie:  ASPSESSIONIDSCBTCBSA=OBOHJDKABOLGBEOMEDLBNGDH; path=/
        XPoweredBy:  ASP.NET
        Date:  Fri, 05 Jun 2009 16:41:08 GMT
        HeaderEnd: CRLF

    Then I sent another request to the same server, and again on the request that is going to the origin server, I can clearly see the cookie being sent to the server from ARR via the request header:


    - Http: Request, GET /env.asp
        Command: GET
      + URI: /env.asp
        ProtocolVersion: HTTP/1.1
        Keep-Alive:  300
        Accept:  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
        Accept-Charset:  ISO-8859-1,utf-8;q=0.7,*;q=0.7
        Accept-Encoding:  gzip,deflate
        Accept-Language:  en-us,en;q=0.5
        Cookie:  testcookie=Hello; ASPSESSIONIDSCBTCBSA=OBOHJDKABOLGBEOMEDLBNGDH
        Host:  arr2
        Max-Forwards:  10
        UserAgent:  Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
        X-Original-URL:  /env.asp
        X-Forwarded-For:  [2001:4898:2a:5:50e8:1030:165c:4924]:50465
        X-ARR-LOG-ID:  10767ae5-588c-45b2-83d7-c618c02d8f03
        Connection:  Keep-Alive
        HeaderEnd: CRLF

    Here is what I would recommend that you try.  Basically there are two different places where you will need to do the network tracing; 1) between your origin server and ARR and 2) ARR and your client/browser.  Capture both the request and the response and see what is going on.  In terms of code path, the number of servers in the server farm doesn't really play a role in how the cookies are being set by your application.  You will want to take a look at the traces and see if your application is setting the cookie correctly when there is only one server.  Then verify that it is being passed correctly by ARR to your client.  On subsequent requests, ensure that your client is sending the cookie in the request header, and again between ARR and your origin server.  Based on your trace, you should be able to narrow down who may be dropping the cookie.

    In my setup, I am able to see the cookie all the way through with having just one server in the server farm.  If you have more data that shows that ARR is not passing the cookie (ie. your server is setting it correctly and that the client/browser is also sending it correctly), then I am happy to look at it more, but we need to be able to repro.

    Thanks.

  • 06-08-2009, 3:03 AM In reply to

    • PawanM
    • Not Ranked
    • Joined on 06-03-2009, 2:39 AM
    • Posts 4

    Re: ARR & Firefox Cookie

    Thx a lot Wonyoo

Page 1 of 1 (6 items)
Microsoft Communities