473,408 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Issues passing cookies between apps on same box

Hi,
I'm having issues with what I'm *sure* is a simple problem.

Basically having a problem passing a cookie between two sites.
On Site A you sign in, and create a cookie with the users ID in it
When the user wants to purchase anything (and enter CC details) we want to
pass the user to the secure site, which is on the same server.
Alas the cookie is not being picked up on the secure site.

a) Both sites are on the same box
b) Works on my development pc, but not on the DEV box (that old chestnut!)
c) The secure site isn't https - we only have the certificate on the
production site, so this isn't an https issue
d) ASP.NET 1.1 (yes, I know...) moving soon
e) After a bit of googling I've added a machnekey section (below) to
web.config, but this hasn;t changed anything - still the same issue.

<machineKey
validationKey="F6EF6C186BDB1A9630BB84301322B022D42 49CFF98407D3D67284AE441B4309F06B5A1B9D7DC37E645783 CFB7DC2C79CC297812BB968B9816EF08DFBD0D98D77"
decryptionKey="AAAD8D2655F03CC1EDE43DEF9D8BFBD4367 73295D0D78C9C"
validation="SHA1" />

If anyone has any ideas it'd be most appreciated.

I take it cookies is the way to go here? We're using forms authentication. I
do not want to pass anything in a query string! :)

Thanks
Dec 10 '07 #1
3 1835
I'm having issues with what I'm *sure* is a simple problem.
The problem is simple. The solution, maybe not.
Basically having a problem passing a cookie between two sites.
On Site A you sign in, and create a cookie with the users ID in it
When the user wants to purchase anything (and enter CC details) we want to
pass the user to the secure site, which is on the same server.
Alas the cookie is not being picked up on the secure site.
This is by design. A browser does not (and should not) give cookies from one
site to a completely different site. For example, you wouldn't want the
cookie generated by your site to be passed to, say, Google, would you?
a) Both sites are on the same box
Doesn't matter. One box can host hundreds of sites, that doesn't mean they
should share information.
b) Works on my development pc, but not on the DEV box (that old chestnut!)
That's probably because they are not really different sites on your
development pc. I bet when you run everything on your development pc that
all URLs start with http://localhost, right? If so, the browser thinks they
are all the same site. When you put it on the "DEV" box I bet the URLs are
different (e.g. http://www.mysite.com and http://secure.mysite.com or
something like that), right?
c) The secure site isn't https - we only have the certificate on the
production site, so this isn't an https issue
Right on.
d) ASP.NET 1.1 (yes, I know...) moving soon
Doesn't matter.
e) After a bit of googling I've added a machnekey section (below) to
web.config, but this hasn;t changed anything - still the same issue.

<machineKey
validationKey="F6EF6C186BDB1A9630BB84301322B022D42 49CFF98407D3D67284AE441B4309F06B5A1B9D7DC37E645783 CFB7DC2C79CC297812BB968B9816EF08DFBD0D98D77"
decryptionKey="AAAD8D2655F03CC1EDE43DEF9D8BFBD4367 73295D0D78C9C"
validation="SHA1" />
You'll still need that bit of info once you get the cookie situation worked
out.
If anyone has any ideas it'd be most appreciated.
Assuming that your problem is domain-related, this article might help:

http://brennan.offwhite.net/blog/200...ith-aspnet-20/
>
I take it cookies is the way to go here? We're using forms authentication.
I
do not want to pass anything in a query string! :)
I agree.

Dec 10 '07 #2
Hi Scott,

Many thanks for the reply
very helpful, especially the link..
http://brennan.offwhite.net/blog/200...ith-aspnet-20/

Alas that deals with asp.net 2.0. I'm still stuck with asp.net 1.1 until
January.
Needless to say I haven't got until Jan to fix, so I'm still looking.

Cheers
Dec 11 '07 #3
Hmmm, you did say that you were using 1.1. But then I was under the
impression that you were using the MS aspnet membership stuff, which comes
with 2.0, so I'm a little confused.

Regardless, I think your problem is just a cookie/domain problem. So try
manipulating that and see what you get.

Here's a sample that appears to be using 1.1:

http://groups.google.com.hk/group/mi...968cc384577926

Scott
"Andy" <An**@discussions.microsoft.comwrote in message
news:B7**********************************@microsof t.com...
Hi Scott,

Many thanks for the reply
very helpful, especially the link..
http://brennan.offwhite.net/blog/200...ith-aspnet-20/

Alas that deals with asp.net 2.0. I'm still stuck with asp.net 1.1 until
January.
Needless to say I haven't got until Jan to fix, so I'm still looking.

Cheers
Dec 11 '07 #4

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

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
10
by: vbMark | last post by:
Hello, I am doing this: window.location="page2.php?subj="+subj+"&body="+body; to send information to another page. However, I don't want that second page to show up or display in any way....
6
by: Tom | last post by:
I know how to create a cookie using the HttpCookie. I know about setting its domain so it can be shared. So I have created a cookie on web site A and set it to expire in 10 minutes. Now I...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
0
by: OG | last post by:
Hello, I would like to share cookies across various web based apps, and from what I understand your apps can do this as long as they all belong to the same domain. For example app1.mydomain.com...
62
by: Tony Ciconte | last post by:
I have a rather complex commercial Acc2003 application (tab controls, 50K+ lines of VBA code, etc.) that will not run well at all on Windows Vista Ultimate. I have seen posts indicating that...
22
by: K. A. | last post by:
I have two servers at work, 'A' for testing and development, and server 'B' for production. On server A, I wrote a PHP test code to login users then direct them to a personalized page. This is...
10
BezerkRogue
by: BezerkRogue | last post by:
I am trying to use cookies to manage session states in an ASP.NET application. The states need to persist only while the browser session is open. My web.config setting is: <system.web>...
5
by: darrel | last post by:
This is an issue I brought up probably a year or so ago, got some advice, then was sidetracked on the project until now. So, here I am again. ;o) The situation is that we have an older chunk of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...
0
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...

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.