469,315 Members | 2,012 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

Serious Problem - Lost Session Variables

Please help.....!

I have built a site that works/worked absolutely fine on my test server.
When I transferred it to a remote web host (the intended permanent home of
the site) something very worrying keeps happening to my site.

I use, as is the norm, session variables to store login information. At the
top of each page I do a check that Session("isLoggedIn") = "True", and if
not then the system logs them back out.

The serious problem is that once you have logged into the site, the next
page you try to open it fails the above check and logs you out! Obviously
Session("isLoggedIn") is not equal to "True" so it assumes you aren't logged
in. So basically the session variables are getting lost/cleared.

This makes my site unusable, and is a disaster for it unless I can get a
solution.

Any ideas? Any help will be very, very appreciated.
Jul 19 '05 #1
12 15393
> The serious problem is that once you have logged into the site, the next
page you try to open it fails the above check and logs you out! Obviously
Session("isLoggedIn") is not equal to "True" so it assumes you aren't logged in. So basically the session variables are getting lost/cleared.


www.aspfaq.com/2157

(microsoft.public.inetserver.asp.db removed from x-post list)
Jul 19 '05 #2
joe
welcome to the wonderful world of sessions thanks to IE and various security
features

"frank" <fr*****@frankie.com> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
The serious problem is that once you have logged into the site, the next page you try to open it fails the above check and logs you out! Obviously Session("isLoggedIn") is not equal to "True" so it assumes you aren't logged
in. So basically the session variables are getting lost/cleared.


www.aspfaq.com/2157


That page has a few interesting suggestions, but the weird thing for me is
that I *never* had this problem when it ran on my test server... only my

new remote host (DiscountASP.NET). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not others.

It's a nightmare.....

Jul 19 '05 #3
> remote host (DiscountASP.NET). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not others.


I don't think this has anything to do with code, for what it's worth.
Jul 19 '05 #4
"joe" <contact_by_Newsgroup_only.please> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
"frank" <fr*****@frankie.com> wrote in message
news:e6**************@TK2MSFTNGP11.phx.gbl...
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
> The serious problem is that once you have logged into the site, the next > page you try to open it fails the above check and logs you out! Obviously
> Session("isLoggedIn") is not equal to "True" so it assumes you aren't logged
> in. So basically the session variables are getting lost/cleared.

www.aspfaq.com/2157


That page has a few interesting suggestions, but the weird thing for me is that I *never* had this problem when it ran on my test server... only my

new
remote host (DiscountASP.NET). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not others.
It's a nightmare.....

welcome to the wonderful world of sessions thanks to IE and various

security features


Is this a known problem that is sometimes unfixable?
Jul 19 '05 #5
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:OQ**************@TK2MSFTNGP12.phx.gbl...
remote host (DiscountASP.NET). It's the same code that has been copied
over - it also works when viewed on some client browsers, but not
others.
I don't think this has anything to do with code, for what it's worth.


Any idea why it works fine when running on one test server, but not when
running on one of the most popular ASP hosts?

Should I forget about using session variables? What is the alternative for
security issues such as logging users in?
Jul 19 '05 #6
> Any idea why it works fine when running on one test server, but not when
running on one of the most popular ASP hosts?


Which of the items in that last have you eliminated?
Jul 19 '05 #7
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:Ol**************@TK2MSFTNGP12.phx.gbl...
Any idea why it works fine when running on one test server, but not when
running on one of the most popular ASP hosts?


Which of the items in that last have you eliminated?


I knew it was only affecting some browsers on some machines (very
inconsistent), but the last half-hour has really confused me.

I was composing an email to DiscountASP.NET and when I just started it I
went into my application and the session variable(s) were lost, as expected.
Half-way through the email I went back into the site and it worked fine
(each page opened fine). I've just now went back into the site and it's no
longer working. Exact same webserver, url, code & client browser. I even
logged into the site with the same test user.

With regards the list of problems;

Due to the fact it sometimes works I've eliminated 1, 2, 3 & 4.

I can probably eliminate 5 & 8 as the application works fine on my test
server.

6 & 7 I couldn't guarantee as I'm not hosting the server but I'd imagine a
respected host such as DiscountASP.NET would make sure these things work.
Jul 19 '05 #8
"frank" wrote:

Is this a known problem that is sometimes unfixable?


Yes. If your site requires Internet Explorer, then it may be unfixable. Do
you experience the same problems with Gecko-based browsers?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #9
"frank" wrote:

I was composing an email to DiscountASP.NET and when I just started it I
went into my application and the session variable(s) were lost, as expected. Half-way through the email I went back into the site and it worked fine
(each page opened fine). I've just now went back into the site and it's no
longer working. Exact same webserver, url, code & client browser. I even
logged into the site with the same test user.


Any chance DiscountASP.NET uses server farms?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #10
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:Oq**************@TK2MSFTNGP11.phx.gbl...
"frank" wrote:

Is this a known problem that is sometimes unfixable?
Yes. If your site requires Internet Explorer, then it may be unfixable.


I don't think it *requires* IE, but obviously since most web users use it I
need it to work with IE. If it's a known issue with IE, WTF are Microsoft
doing releasing a web browser that doesn't always fully support another of
it's own technologies?
Do
you experience the same problems with Gecko-based browsers?


I'll look into it.....

BTW I'm using IE 6 at home and at work, yet the site *always* works fine
when I run it from my desk at work, yet it didn't work from home last night.
Jul 19 '05 #11
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...
"frank" wrote:

I was composing an email to DiscountASP.NET and when I just started it I
went into my application and the session variable(s) were lost, as

expected.
Half-way through the email I went back into the site and it worked fine
(each page opened fine). I've just now went back into the site and it's no longer working. Exact same webserver, url, code & client browser. I even
logged into the site with the same test user.


Any chance DiscountASP.NET uses server farms?


Hmmm... good point - I'll ask them about that.
Jul 19 '05 #12
"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:be************@ID-181477.news.uni-berlin.de...
In news:e6**************@TK2MSFTNGP11.phx.gbl,
frank <fr*****@frankie.com> typed:
: "Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
: news:eV**************@TK2MSFTNGP12.phx.gbl...
::: The serious problem is that once you have logged into the site, the
::: next page you try to open it fails the above check and logs you
::: out! Obviously Session("isLoggedIn") is not equal to "True" so it
::: assumes you aren't logged in. So basically the session variables
::: are getting lost/cleared.
::
:: www.aspfaq.com/2157
:
: That page has a few interesting suggestions, but the weird thing for
: me is that I *never* had this problem when it ran on my test
: server... only my new remote host (DiscountASP.NET). It's the same
: code that has been copied
: over - it also works when viewed on some client browsers, but not
: others.
:
: It's a nightmare.....

I had a problem with IE6 when I didn't have a P3P policy setup in the
headers.

Add Header:
Header Name: P3P
Header Content: CP='NOI DSP COR NID CUR PSDa OUR NOR STA'

Its a short generic Compact Policy

For a little more info:
http://chxo.com/be2/news/document-p3...er_a_2590.html


I assume I have to go the full hog and create a compact P3P policy for my
site (Xml documents etc.)?

What is the best method of doing this?
Jul 19 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Eliyahu Goldin | last post: by
5 posts views Thread by rich00 | last post: by
9 posts views Thread by AndersBj | last post: by
7 posts views Thread by Erik | last post: by
4 posts views Thread by Sarah Marriott | last post: by
10 posts views Thread by Nils Erik Dall | last post: by
3 posts views Thread by AlonR | last post: by
2 posts views Thread by maxkumar | last post: by
5 posts views Thread by google | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.