Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:52 AM
Tony Archer
Guest
 
Posts: n/a
Default URGENT: Strange Cookie Problem! Production App is Failing!

(Forgive the dupicate post, I had left out the OS Version out of the prior
post.)

Gentlemen, your urgent help is needed in solving a STRANGE problem.

I have two servers a dev box, and a production box. On the dev box
everything works fine, in production it hoses:

One of the things a user can do is click a "Change region" link which takes
them to a map of the world. They can then select one of four regions.

When they select a region it takes them to a page which reads a variable and
then sets a cookie which is then referenced throughout the site.

like: cds.asp?r=0 (0,1,2,3 are the valid valies)

NOW I'm not asking you to debug code, as I am POSITIVE it has nothing to do
with that and here's why:

DEV BOX Running NT-4 SP6a:
- Default FTP (All IPs)
- Default SMTP (All IPs)
- Default NNTP (All IPs)
- Default Web Server (IP-1:80)
- New Web Server (IP-2:80)
- New Web Server - Back Door (IP-1:88)
* IP-1 and IP-2 are assigned to the same network card, there is no second
NIC.

All three web servers are pointing at the same physical directory. (The
reason is irrelevant, but if you must know it's because we're using a
security ISAPI filter which screws up Front Page Extensions. SO the second
IP allows FP to connect and the back door allows a script to run)

If I hit the Default Web Server the cookies are updated and everything
changes fine.
If I hit "New Web Server - Back Door" or "New Web Server" the cookie appears
to get updated on the page doing the work (I checked by printing both the
variable and the request.cookie) but then is not for any other pages
referencing it.

My Production server is set up in much the same way.



  #2  
Old July 19th, 2005, 09:53 AM
Steve Lutz
Guest
 
Posts: n/a
Default Re: URGENT: Strange Cookie Problem! Production App is Failing!

If you are accessing the same machine over 2 IP addresses, then I assume
that you are using 2 different names, correct?

Let's say your 2 IP's are named www1.domain.com and www2.domain.com

If you access the "backdoor" IP (www1.domain.com) to get the cookie you get
a cookie for www1.domain.com
When you then access the front door (www2.domain.com) the cookie from
www1.domain.com doesn't apply to this site.

When you write cookies, by default they are host based cookies, and only
apply to the full domain. (www1.domain.com and www2.domain.com).
If you are not using names for the IP's, then you are in just as much
trouble as the cookies will only apply to the IP address.

Read more about cookies in the Cookie RFC (too lazy to find a link for you
right now).

You can change this by making the cookies domain based. Example code:
response.cookies("TEST") = HELLO
response.cookies("TEST").domain = "domain.com"

This code will only work if you are using names, and not IP's to access the
site. Also, the domain.com has to be the domain that the user is comming in
as.

Hope this helps

Steve







"Tony Archer" <me@_N05PAM_tonyarcher.com> wrote in message
news:e#q$7sCuDHA.1760@TK2MSFTNGP10.phx.gbl...[color=blue]
> (Forgive the dupicate post, I had left out the OS Version out of the prior
> post.)
>
> Gentlemen, your urgent help is needed in solving a STRANGE problem.
>
> I have two servers a dev box, and a production box. On the dev box
> everything works fine, in production it hoses:
>
> One of the things a user can do is click a "Change region" link which[/color]
takes[color=blue]
> them to a map of the world. They can then select one of four regions.
>
> When they select a region it takes them to a page which reads a variable[/color]
and[color=blue]
> then sets a cookie which is then referenced throughout the site.
>
> like: cds.asp?r=0 (0,1,2,3 are the valid valies)
>
> NOW I'm not asking you to debug code, as I am POSITIVE it has nothing to[/color]
do[color=blue]
> with that and here's why:
>
> DEV BOX Running NT-4 SP6a:
> - Default FTP (All IPs)
> - Default SMTP (All IPs)
> - Default NNTP (All IPs)
> - Default Web Server (IP-1:80)
> - New Web Server (IP-2:80)
> - New Web Server - Back Door (IP-1:88)
> * IP-1 and IP-2 are assigned to the same network card, there is no second
> NIC.
>
> All three web servers are pointing at the same physical directory. (The
> reason is irrelevant, but if you must know it's because we're using a
> security ISAPI filter which screws up Front Page Extensions. SO the[/color]
second[color=blue]
> IP allows FP to connect and the back door allows a script to run)
>
> If I hit the Default Web Server the cookies are updated and everything
> changes fine.
> If I hit "New Web Server - Back Door" or "New Web Server" the cookie[/color]
appears[color=blue]
> to get updated on the page doing the work (I checked by printing both the
> variable and the request.cookie) but then is not for any other pages
> referencing it.
>
> My Production server is set up in much the same way.
>
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles