Problems with Session

M

Marc Hoeve

Hi everybody

I'm setting up 2 websites for a friend of mine, en I'm have problems with
one of the sites.

The situation: I have 2 different domains (both in the .NL domain). Both
domains provides the possibility for users to log in. The loginscript and
the databases are hosted at server 1. The site at server 2 contains a link
to the loginpage at server 1. That works well... so far.

The problem is that when I log in at server 2, he doesn't accept it. I found
out that the Session variable I use isn't recognised. I use
Session("protected") to keep track of the users who are logged in. When
there credentials are right according to the database,
Session("protected")=True and the loginpage gives a redirection to
partner.asp by doing Response.Redirect "partner.asp". Trying to log in from
server 1 works fine, trying to log in from server 2 doesn't.

My questions therefore are:
1. Is the Session variable rememberd by server 2 (although server 1 contains
the loginpage en gives a redirection to a page on server 1)
2. What can I do to correct this problem?

Your answers are appreciated, and sorry for the possible worse language in
this message (English is not my native language ;))

Greetings,
Marc
 
M

Maarten

Session variables and cookies are not cross domain. In MSIE see Options,
Security, direct an inderct cookies
 
O

ou812

On Fri, 25 Jun 2004 22:21:51 +0200, "Marc Hoeve" <[email protected]>
wrote:

1. The session variable will not be on Server 2, that's for sure.
2. Ask yourself questions.

Are the domains pointing to IP addresses that sit on two completely
different network cards/boxes? Are these virtual domains? Given all
the microsoft Q articles on security issues and stuff, this question
may lead to something. Who knows.

Is the <A></A> link on the page from server2 using a fully qualified
domain name starting with http:// and reference to the directory and
page name on server1?

Is the form "action" attribute pointing to a fully qualified domain
name and script name on Server 1?

Have you tried various cookie settings, including "Accept all" to see
if this has any impact?

Just some ideas. Enjoy.
 
M

Marc Hoeve

Hi Maarten,

I don't want to share the session variable between the domains. I just want
to create a session on server 1 by clicking on the link to the login page at
server 2... The session must be rememberd by server 1...

Thanx for your answer though :)

Greetings,
Marc
 
M

Marc Hoeve

Hi,

Thank you for your answer.

As I answered Maarten, the session variable must be rememberd by server 1
for the program to function correctly. All files that work with this session
are at server 1, that's why I can't figure out where the problem is.
Are the domains pointing to IP addresses that sit on two completely
different network cards/boxes? Are these virtual domains? Given all
the microsoft Q articles on security issues and stuff, this question
may lead to something. Who knows.

I don't know that. The websites are hosted by an ISP (both sites are hosted
by the same ISP). But knowing that site 1 contains all the files that work
with session, I can't imagine that this has anything to do with that...
Is the <A></A> link on the page from server2 using a fully qualified
domain name starting with http:// and reference to the directory and
page name on server1?
Tried both fully qualified domain names and the short one :)
Is the form "action" attribute pointing to a fully qualified domain
name and script name on Server 1?
Yes, it is... and for testing, I also tried to just point to the file...
both worked in that sense, that it didn't matter....
Have you tried various cookie settings, including "Accept all" to see
if this has any impact?
As far as I know, Session variables are not stored in cookies, but are
rememberd by IIS for a period of time (depending on the specific setting of
IIS at this point).

Maybe you have some other idea's. Anyway, thank you for your answer...
Appreciate it :)

Greetings,
Marc
 
M

Marc Hoeve

Hi,

Thank you again for your reaction...

I tried it, but it didn't work :(

Greetings,
Marc
 
M

Marc Hoeve

Hi everyone,

I have tried a work-around with success. Both sites are now on server 1,
server 2 has a response.redirect to server 1. This works very fine.

But still, I would like to have a solution for my problem. I hope someone
out there has an answer?

Thank you in advance for your help.

Greetings,
Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,413
Latest member
KeiraLight

Latest Threads

Top