By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,458 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,458 IT Pros & Developers. It's quick & easy.

setting a server variable?

P: n/a
I know that you can do : Request.ServerVariables("QUERY_STRING") but can
you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via vbscipt/asp?

--

Jack Vamvas
___________________________________
The latest IT jobs - www.ITjobfeed.com
<a href="http://www.itjobfeed.com">UK IT Jobs</a>

Mar 6 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Jack Vamvas wrote:
I know that you can do : Request.ServerVariables("QUERY_STRING") but
can you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via
vbscipt/asp?
No. Anything contained by the Request object is read-only. What's wrong with
session or application variables?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Mar 6 '07 #2

P: n/a
"Jack Vamvas" <DE**********@del.comwrote in message
news:BN*********************@bt.com...
I know that you can do : Request.ServerVariables("QUERY_STRING") but
can
you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via
vbscipt/asp?

You can set an Environment Variable in the registry...
Mar 6 '07 #3

P: n/a
This is part of a problem I'm having with Server.Transfer , whereby I'm
doing a Server.Transfer to a page that has query string parameters ,(which
is not allowed).
I think you are right Session Variables are the way to go.

--

Jack Vamvas
___________________________________
The latest IT jobs - www.ITjobfeed.com
<a href="http://www.itjobfeed.com">UK IT Jobs</a>
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcomwrote in message
news:u8**************@TK2MSFTNGP06.phx.gbl...
Jack Vamvas wrote:
>I know that you can do : Request.ServerVariables("QUERY_STRING") but
can you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via
vbscipt/asp?

No. Anything contained by the Request object is read-only. What's wrong
with session or application variables?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Mar 7 '07 #4

P: n/a

"McKirahan" <Ne**@McKirahan.comwrote in message
news:Uo******************************@comcast.com. ..
"Jack Vamvas" <DE**********@del.comwrote in message
news:BN*********************@bt.com...
I know that you can do : Request.ServerVariables("QUERY_STRING") but
can
you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via
vbscipt/asp?

You can set an Environment Variable in the registry...

Me thinks you have your tongue in cheek ;)
Mar 7 '07 #5

P: n/a
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>
"McKirahan" <Ne**@McKirahan.comwrote in message
news:Uo******************************@comcast.com. ..
"Jack Vamvas" <DE**********@del.comwrote in message
news:BN*********************@bt.com...
I know that you can do : Request.ServerVariables("QUERY_STRING")
but
can
you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via
vbscipt/asp?

You can set an Environment Variable in the registry...

Me thinks you have your tongue in cheek ;)
Not so.

(Windows XP) set the System Environment Variable
via Control Panel + System + Advanced + Environment Variables.

(Windows 98) set the Volatile Environment Variable
via scripting to create "HKCU\Volatile Environment\{variable}".
Mar 7 '07 #6

P: n/a

"McKirahan" <Ne**@McKirahan.comwrote in message
news:l9******************************@comcast.com. ..
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...

"McKirahan" <Ne**@McKirahan.comwrote in message
news:Uo******************************@comcast.com. ..
"Jack Vamvas" <DE**********@del.comwrote in message
news:BN*********************@bt.com...
I know that you can do : Request.ServerVariables("QUERY_STRING")
but
can
you actually set a serverVariable?
I know that sounds counter intuitive , but is it possible, via
vbscipt/asp?
>
You can set an Environment Variable in the registry...
>
>
Me thinks you have your tongue in cheek ;)

Not so.

(Windows XP) set the System Environment Variable
via Control Panel + System + Advanced + Environment Variables.

(Windows 98) set the Volatile Environment Variable
via scripting to create "HKCU\Volatile Environment\{variable}".
Yes, yes I know it's possible. It's just such a really bad idea I thought
you were joking.

Why would you want to do that instead of using the application/session
object?

Or do you imagine that system environment variables some how equate to
Request.ServerVariables?


Mar 7 '07 #7

P: n/a

"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uz**************@TK2MSFTNGP06.phx.gbl...

[snip]
Yes, yes I know it's possible. It's just such a really bad idea I thought
you were joking.

Why would you want to do that instead of using the application/session
object?

Or do you imagine that system environment variables some how equate to
Request.ServerVariables?
You're correct.

I didn't notice the group when I responded to the post.
I was thinking about a WSH / VBScript solution not ASP.

My bad...
Mar 7 '07 #8

P: n/a
I implemented the session solution.Works fine

Thanks

Jack

http://www.itjobfeed.com
Mar 21 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.