D
doltharz
Please Help me
i'm doing something i though was to be REALLY EASY but it drives me
crazy
The complete code is at the end of the email
(i mean newsgroup article),
i always use Option Explicit
and Response.Expires=-1,
there is NO INCLUDE at all,
no side effect from any other asp page,
no global.asa of nothing like that.
It's on MY IIS 5 server
hosted on a Win2000 server SP3.
I'm using IE6-SP1
Here it goes for step by step explanation:
I call http://192.168.0.102/Page.asp&driving=me&crazy=true
I write down session variable content
Response.Write Session("DoltharzURL") & "<BR>"
<!-- THE NEXT LINE IS REALLY BLANK -->
(( Till it's the first time, there is nothing here ))
<!-- THE PREVIOUS LINE IS REALLY BLANK -->
i put the current page address with its querystring in a session
variable
Dim tmp
tmp = Request.ServerVariables("SCRIPT_NAME") & "?" &
Request.ServerVariables("QUERY_STRING") & ""
Session("DoltharzURL") = tmp & ""
The & "" at the end is to be sure the data is really a string and not
a reference to an object even if it's not necessary till it's already
a concatenation of something else... too much can't hurt.
Then i write down session variable content, just to be sure it's realy
in the session variable and it's really there.
Response.Write Session("DoltharzURL") & "<BR>"
/Page.asp?driving=me&crazy=true
Then i REOPEN the SAME page which does write down the session variable
content
Response.Write Session("DoltharzURL") & "<BR>"
/Page.asp?
Why is the querystring gone????????????
Even stranger, if i set the Session Variable content this way
Session("DoltharzURL") = "BEGIN" & tmp & "END"
I'll end up with
BEGIN/Page.asp?END
Even if all the time Response.Write folling the Session Variable
content definition gives me the right content
Going even further, i manually set the content to
"/Page.asp?driving=me&crazy=true"
without calling any other function (ServerVariables) and here it's
working fine.
So i said to myself, there is a {BEEP} \0 at the end of that {BEEP}
Request.ServerVariables("")^so i've type a function that write down
the content of the string byte by byte giving all ascii code...
<%
For i = 1 to len(arg)
Response.Write i & ", " & mid(arg,i,1) & ", " & asc(mid(arg,i,1))
& "<BR>"
next
%>
it gives me (fake one)
1, /, 47
2, p, 99
3, a, 115
4, g, 115
5, e, 116
6, .
7, a
8, s
9, p
10, ?
11, d
12, r
13, i
14, v
15, i
16, n
17, g
18, =
19, m
20, e
21, &
22, c
23, r
24, a
25, z
26, y
27, =
28, t
29, r
30, u
31, e
with no gap in the char count 1..2..3..4..5.. ... ..31..32
there is no \o between "/page.asp?" and "Drime=me&Crazy=true"
So i though it was the "?" so i replace it by "XYZ" to end up with
/Page.aspXYZ
The variable is called DoltharzURL which i assumed isn't a reserved
keyword, if it is... i'm a very lucky guy.
Please Help me
<%
'Rem * * * CALL THIS PAGE TWICE WITH TWO ARGs ON THE QUERYSTRING
'Rem * * * e.g.: Page.asp?arg1=value1&arg2=value2
Dim tmp
tmp = Session("DoltharzURL")
Response.Write "tmp=" & tmp & "<BR>"
Response.Write Session("DoltharzURL") & "<BR>"
Response.Write Session.SessionID & "<BR>"
tmp = Request.ServerVariables("SCRIPT_NAME") & "?" &
Request.ServerVariables("QUERY_STRING") & ""
Session("DoltharzURL") = tmp & ""
Response.Write "tmp=" & tmp & "<BR>"
Response.Write Session("DoltharzURL") & "<BR>"
Response.Write Session.SessionID & "<BR>"
%>
Reply to both my personnal email and this group...
doltharz at hotmail dot com
I'm not a GURU nor an EXPERT or something like that.
I'm just a passionnate programmer.
Doltharz
i'm doing something i though was to be REALLY EASY but it drives me
crazy
The complete code is at the end of the email
(i mean newsgroup article),
i always use Option Explicit
and Response.Expires=-1,
there is NO INCLUDE at all,
no side effect from any other asp page,
no global.asa of nothing like that.
It's on MY IIS 5 server
hosted on a Win2000 server SP3.
I'm using IE6-SP1
Here it goes for step by step explanation:
I call http://192.168.0.102/Page.asp&driving=me&crazy=true
I write down session variable content
Response.Write Session("DoltharzURL") & "<BR>"
<!-- THE NEXT LINE IS REALLY BLANK -->
(( Till it's the first time, there is nothing here ))
<!-- THE PREVIOUS LINE IS REALLY BLANK -->
i put the current page address with its querystring in a session
variable
Dim tmp
tmp = Request.ServerVariables("SCRIPT_NAME") & "?" &
Request.ServerVariables("QUERY_STRING") & ""
Session("DoltharzURL") = tmp & ""
The & "" at the end is to be sure the data is really a string and not
a reference to an object even if it's not necessary till it's already
a concatenation of something else... too much can't hurt.
Then i write down session variable content, just to be sure it's realy
in the session variable and it's really there.
Response.Write Session("DoltharzURL") & "<BR>"
/Page.asp?driving=me&crazy=true
Then i REOPEN the SAME page which does write down the session variable
content
Response.Write Session("DoltharzURL") & "<BR>"
/Page.asp?
Why is the querystring gone????????????
Even stranger, if i set the Session Variable content this way
Session("DoltharzURL") = "BEGIN" & tmp & "END"
I'll end up with
BEGIN/Page.asp?END
Even if all the time Response.Write folling the Session Variable
content definition gives me the right content
Going even further, i manually set the content to
"/Page.asp?driving=me&crazy=true"
without calling any other function (ServerVariables) and here it's
working fine.
So i said to myself, there is a {BEEP} \0 at the end of that {BEEP}
Request.ServerVariables("")^so i've type a function that write down
the content of the string byte by byte giving all ascii code...
<%
For i = 1 to len(arg)
Response.Write i & ", " & mid(arg,i,1) & ", " & asc(mid(arg,i,1))
& "<BR>"
next
%>
it gives me (fake one)
1, /, 47
2, p, 99
3, a, 115
4, g, 115
5, e, 116
6, .
7, a
8, s
9, p
10, ?
11, d
12, r
13, i
14, v
15, i
16, n
17, g
18, =
19, m
20, e
21, &
22, c
23, r
24, a
25, z
26, y
27, =
28, t
29, r
30, u
31, e
with no gap in the char count 1..2..3..4..5.. ... ..31..32
there is no \o between "/page.asp?" and "Drime=me&Crazy=true"
So i though it was the "?" so i replace it by "XYZ" to end up with
/Page.aspXYZ
The variable is called DoltharzURL which i assumed isn't a reserved
keyword, if it is... i'm a very lucky guy.
Please Help me
<%
'Rem * * * CALL THIS PAGE TWICE WITH TWO ARGs ON THE QUERYSTRING
'Rem * * * e.g.: Page.asp?arg1=value1&arg2=value2
Dim tmp
tmp = Session("DoltharzURL")
Response.Write "tmp=" & tmp & "<BR>"
Response.Write Session("DoltharzURL") & "<BR>"
Response.Write Session.SessionID & "<BR>"
tmp = Request.ServerVariables("SCRIPT_NAME") & "?" &
Request.ServerVariables("QUERY_STRING") & ""
Session("DoltharzURL") = tmp & ""
Response.Write "tmp=" & tmp & "<BR>"
Response.Write Session("DoltharzURL") & "<BR>"
Response.Write Session.SessionID & "<BR>"
%>
Reply to both my personnal email and this group...
doltharz at hotmail dot com
I'm not a GURU nor an EXPERT or something like that.
I'm just a passionnate programmer.
Doltharz