473,856 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

URGENT: Strange Cookie Problem! Production App is Failing!

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:
- 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.
Jul 19 '05 #1
10 2569
PS - The servers are running NT 4.0
Jul 19 '05 #2
Do any of the machines have underscores in their name? For other
possibilities see
http://www.aspfaq.com/2157

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Tony Archer" <me@_N05PAM_ton yarcher.com> wrote in message
news:ef******** ******@TK2MSFTN GP11.phx.gbl...
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:
- 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.

Jul 19 '05 #3
Nope. It's just one cookie being used. Called "CDSRegion"

Here is the code. But again. It works fine if I browse the site using the
default web server, but NOT if I hit the SAME files from a different IP or
port.

<% Response.Buffer = TRUE %>
<%
Dim sFullPageLink

CDS_Region = Request.QuerySt ring("r")

IF CDS_Region = "" THEN
CDS_Region = Request.Cookies ("CDSRegion" )
ELSE
Response.Cookie s("CDSRegion" ) = CDS_Region
Response.Cookie s("CDSRegion"). Expires = DateAdd("m", 1, Date)
END IF
%>

Other pages then try to:

CDS_Region = Request.Cookies ("CDSRegion" )

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eh******** ******@tk2msftn gp13.phx.gbl...
Do any of the machines have underscores in their name? For other
possibilities see
http://www.aspfaq.com/2157

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #4
None of the other possibilities in the article are true for me.

Any other ideas?

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eh******** ******@tk2msftn gp13.phx.gbl...
Do any of the machines have underscores in their name? For other
possibilities see
http://www.aspfaq.com/2157

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #5
> Nope. It's just one cookie being used.

What question are you answering here? I asked about MACHINES (e.g.
SERVERS), not cookies.

Did you investigate the other bullet points at http://www.aspfaq.com/2157?
If your code is correct, I'd be very surprised if this isn't being caused by
one (or more) of those reasons...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #6
When you go from one site to the other, does the lower right icon change
from Trusted Sites to something else, or vice versa?

Does it all work using a downgraded browser, e.g. IE 5.0 or Netscape?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Tony Archer" <me@_N05PAM_ton yarcher.com> wrote in message
news:ey******** ******@TK2MSFTN GP12.phx.gbl...
None of the other possibilities in the article are true for me.

Any other ideas?

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eh******** ******@tk2msftn gp13.phx.gbl...
Do any of the machines have underscores in their name? For other
possibilities see
http://www.aspfaq.com/2157

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Jul 19 '05 #7
Doh!

Answered the wrong question. No, the machine names have no underscores in
the names.

Just to be sure I don't miss any:

1.. Make sure cookies are enabled in your browser - session variables
require cookies.

*THEY ARE
2.. If you are using IE 6.0, the new privacy policy settings might be
biting you in the rear. You will need to read up on P3P, and discover how IE
is affected in KB #293222.

* HAPPENS REGARDLESS OF IE 5.5 or 6.0

3.. If you are using IE 5.5 or IE 6.0, and your local server name has an
underscore or other non-alphanumeric character (other than a dash) in the
name, then cookies will not work correctly. One workaround is to access the
machine by IP address; others include renaming the server or at least adding
an entry to the clients' hosts files, or alter your local DNS/WINS, or add a
new host header to the web server, with a more friendly name. For more info,
see KB #312461 and KB #316112.

*NO UNDERSCORES IN NAME
4.. Make sure you haven't disabled session state in Internet Services
Manager, and that it has an appropriate timeout value:

* IT IS ENABLED AND SET TO 20 (DEFAULT)
5.. Check that you aren't expecting to maintain session variables across:

* I AM NOT.

6.. If you are relying on session or application variables created in
global.asa, make sure that global.asa is in fact firing (see Article #2076).

* I AM NOT.
7.. If you are running McAfee, it may be scanning global.asa constantly,
and preventing your application from behaving consistently (see KB #303881)

*I AM NOT.

8.. Finally, check to see that you aren't manually disabling the user's
session, either by a coding/logic/database error, a misplaced <%@
ENABLESESSIONST ATE = False %> (which will affect a specific page), or an
errant session.timeout value (which will affect all pages).

*I AM NOT.
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:OY******** ********@TK2MSF TNGP12.phx.gbl. ..
Nope. It's just one cookie being used.
What question are you answering here? I asked about MACHINES (e.g.
SERVERS), not cookies.

Did you investigate the other bullet points at http://www.aspfaq.com/2157?
If your code is correct, I'd be very surprised if this isn't being caused

by one (or more) of those reasons...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #8
No, it stays "Internet" the entire time, regardless.

Same issue using Opera to browse.

My personal feeling is that it has to do with how the path for the cookie is
being stored. My bet is that IIS is for some reason sending the default web
server as the path and then when it comes time to read the cookie it cannot
find it under the name it is looking for.

--Tony
"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
When you go from one site to the other, does the lower right icon change
from Trusted Sites to something else, or vice versa?

Does it all work using a downgraded browser, e.g. IE 5.0 or Netscape?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Tony Archer" <me@_N05PAM_ton yarcher.com> wrote in message
news:ey******** ******@TK2MSFTN GP12.phx.gbl...
None of the other possibilities in the article are true for me.

Any other ideas?

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:eh******** ******@tk2msftn gp13.phx.gbl...
Do any of the machines have underscores in their name? For other
possibilities see
http://www.aspfaq.com/2157

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/



Jul 19 '05 #9
Maybe I've been asking the wrong questions. I was assuming that the same
code, on each server, was behaving differently, depending on the server.

Now, it's my impression that you are setting a cookie on IP-1, and expecting
to read it on IP-2, or IP-1:different port #?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Tony Archer" <me@_N05PAM_ton yarcher.com> wrote in message
news:#V******** ******@TK2MSFTN GP12.phx.gbl...
No, it stays "Internet" the entire time, regardless.

Same issue using Opera to browse.

My personal feeling is that it has to do with how the path for the cookie is being stored. My bet is that IIS is for some reason sending the default web server as the path and then when it comes time to read the cookie it cannot find it under the name it is looking for.

--Tony

Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5561
by: Craig Matthews | last post by:
hello, any idea why the following code does not work?!! <? $cookieExpire = 864000000; setcookie("a", "love", $cookieExpire); header("Set-Cookie: lc=50; expires=$cookieExpire");
7
2101
by: Fnark | last post by:
Can anyone tell me why this code does not do what I want it to: <?php if (!isset($_COOKIE)) { setcookie("basket", $item_code, time()+60*60*24*30, "coursework", '', 0) ; } else { setcookie( "basket", $_COOKIE-$item_code ); }
1
1917
by: Spidah | last post by:
I am working on a shopping cart for a client and have struck a weird problem. The client's ssl setup is on a different url to the main site. As a result we get two copies of our shopping cart session cookie generated - one under each url. I gather the script is creating separate sessions for each url. After the customer's payment approval/invoice is generated the cart is supposed to be cleared, but only one of the cookies is being...
5
3500
by: AHN | last post by:
Please tell me somebody what causes the cookie set with <% Response.Cookies("blah") = "Blah blah" Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() ) %> work as supposed on my local server but fail on my site on Brinkster. On the next page it disappears if used with "Expires" attribute set, and is there, if without. It was working some time ago. I was forced to reinstall my OS (W2k, IIS 5.0) since then and already a few days I...
7
1488
by: Thaynann | last post by:
I am developin an application that access a web site, i can get to the first page of the site, but when i POST to get to other pages, it gives me a message (amongst the HTML code) "Session Timed Out" It doesnt happen in IE, unless i leave the site sitting for about 10mins (my code executes in under 10 mins) can anyone help me as to why this happens? Thanx in advance,
1
1545
by: Joe | last post by:
Hi folks, Been looking at this for the day so any ideas would be appreciated. Here's the scenario, bear with me - it looks more complicated than it is :) I have a page templating system that inherits from the page class and adds a mixture of usercontrols and literals when requested. One of the usercontrols is a menu that expands on being clicked using DHTML. What I'm trying to do is to persist the expanded menu to other pages or
17
5222
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be running continuously and refreshing once an hour. I there set timeout= 61 in <sessionState section and on my page it says <meta http-equiv="refresh" content="3600">. I also set timeout=120 in the <forms section of web.config to make sure
3
1032
by: Shapper | last post by:
Hello, I have a Cookie which can have one or many values. One of this values is "Culture". How can I change the "Culture" value which in inside the cookie? This is what I have: Dim cookie As HttpCookie = Request.Cookies("MyWebSite") If Not cookie Is Nothing Then ' Cookie MyWebSite exists
16
2404
by: Victor | last post by:
I have a strange problem in my website. I configured my website to run under 2 worker processes. (web garden enabled). and I stored my user information in the current httpcontext(like Httpcontext.current.items.add("__currentuser", myUserobject") and retrieve the user object like (user = (UserType)Httpcontext.current.items). the website authentication based on the form authentication. and I used login control and customized the validation...
0
1158
by: bertie.bunch | last post by:
Hi, I have been working on some code that interacts with a website using the HTTPRequest object and I have come across an issue where cookies behave differently in the dotnet framework to the way they behave in Internet Explorer and FireFox. If I visit the website in question, it returns a cookie with a leading
0
9918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10786
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9532
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7097
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5959
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4578
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4175
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3202
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.