470,594 Members | 1,498 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

session var trouble, it's been awhile

Hi-

I'm setting a session var in global ASA like this:
Session("Scope") = GetScopeList( Session("docRootPath") )

Where GetScopeList is a function in global.asa that will return a string
array of folder names
Session("docRootPath") is an application variable that I set earlier.

OK, when I drop Response.Write() calls in the global.asa and force an error
right after, I can determine that there is indeed an array of strings stored
in the session("Scope")

But if I try to get to that session variables in another page (*.asp) it is
always empty.

I have a basic redirect.asp page in the wwroot that redirects to a virtual
folder where my site is.

I really don't know what this could be, what would cause this variable to
get errased?

Thanks,
Steve
Jul 19 '05 #1
6 2441
> OK, when I drop Response.Write() calls in the global.asa

You can't response.write in global.asa!
But if I try to get to that session variables in another page (*.asp) it is always empty.
Are you sure the folder that global.asa is in is marked as an application...
I have a basic redirect.asp page in the wwroot that redirects to a virtual
folder where my site is.


global.asa will apply to folders that are marked as applications. If you
virtual folder is marked as an application, it will start its own session,
rather than inheriting the one you started in the root...

A
Jul 19 '05 #2
> sk: yes you can. It makes no sense, but you can.

In what method would you do this? How would the client ever see it?
global.asa is 'touched' but not actually loaded by the client, not presented
to the browser, etc... maybe you could show an example of how you use
response.write in global.asa.

A
Jul 19 '05 #3
debugging.
When you have functions in your global.asa and you need to see either where
execution is failing OR a value of a variable, throw in a Response.Write()
and things are much easier. I'm surprised that no one sees the benefit of
that.
"Bob Lehmann" <no****@dontbotherme.zzz> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
Oddly enough, the response.write is rendered on the page you open in the
browser. Why you would want to do this, though, is beyond me.

Bob Lehmann

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl...
sk: yes you can. It makes no sense, but you can.


In what method would you do this? How would the client ever see it?
global.asa is 'touched' but not actually loaded by the client, not

presented
to the browser, etc... maybe you could show an example of how you use
response.write in global.asa.

A


Jul 19 '05 #4
> Oddly enough, the response.write is rendered on the page you open in the
browser. Why you would want to do this, though, is beyond me.


Right, but within which sub? For example, I know response is invalid in
session_onend. I haven't really explored the other subs because I abandoned
global.asa long ago...
Jul 19 '05 #5
I place in session onstart.

Bob

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:el**************@tk2msftngp13.phx.gbl...
Oddly enough, the response.write is rendered on the page you open in the
browser. Why you would want to do this, though, is beyond me.
Right, but within which sub? For example, I know response is invalid in
session_onend. I haven't really explored the other subs because I

abandoned global.asa long ago...

Jul 19 '05 #6
uh yeah, I know response.write is useful for debugging. It's unusal to use
global.asa in the manner you are using it.
Bob Lehmann

"stever" <sk****@stever.com> wrote in message
news:ei**************@tk2msftngp13.phx.gbl...
debugging.
When you have functions in your global.asa and you need to see either where execution is failing OR a value of a variable, throw in a Response.Write()
and things are much easier. I'm surprised that no one sees the benefit of
that.
"Bob Lehmann" <no****@dontbotherme.zzz> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
Oddly enough, the response.write is rendered on the page you open in the
browser. Why you would want to do this, though, is beyond me.

Bob Lehmann

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uw**************@TK2MSFTNGP10.phx.gbl...
> sk: yes you can. It makes no sense, but you can.

In what method would you do this? How would the client ever see it?
global.asa is 'touched' but not actually loaded by the client, not

presented
to the browser, etc... maybe you could show an example of how you use
response.write in global.asa.

A



Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Avinash Korwarkar | last post: by
6 posts views Thread by Brian Brinks | last post: by
1 post views Thread by Brian Schloz | last post: by
3 posts views Thread by Paul Daly (MCP) | last post: by
9 posts views Thread by Adrian Parker | last post: by
14 posts views Thread by aroraamit81 | last post: by
5 posts views Thread by =?Utf-8?B?TWljaGFlbA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.