Re: How to retain IIS session ? - WeOnlyDo Discussion board

Re: How to retain IIS session ? (General questions)

by Don, Saturday, March 07, 2009, 23:26 (5739 days ago) @ wodDamir

Note sure if this helps... but the following is what is retreived from the loader.asp page (before HttpDLX is called):

[code]
HTTP_ACCEPT=*/*
HTTP_ACCEPT_LANGUAGE=en-us
HTTP_CONNECTION=Keep-Alive
HTTP_HOST=www.abcabc.ca
HTTP_REFERER=http://www.defdef.ca/loader_test.asp
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
HTTP_COOKIE=ASPSESSIONIDQADTBCCD=BDDDFNCBDBGGJOCFGOJNECFH
HTTP_ACCEPT_ENCODING=gzip, deflate
[/code]

This is what is retreived from the page HttpDLX calls:

[code]
HTTP_HOST=www.abcabc.ca
HTTP_ACCEPT_ENCODING=gzip,deflate
HTTP_HTTP_ACCEPT=
HTTP_HTTP_ACCEPT_LANGUAGE=
HTTP_HTTP_CONNECTION=
HTTP_HTTP_HOST=
HTTP_HTTP_REFERER=
HTTP_HTTP_USER_AGENT=
HTTP_HTTP_COOKIE=
HTTP_HTTP_ACCEPT_ENCODING=
[/code]

Below is what I am using to attempt passing the Loader HTTP variables through HttpDLX:

[code]
If trim(request.servervariables( SERVER_PORT )) = 443 Then
hReq = https
Else
hReq = http
End If

aliasid = request.querystring( alias )

URL = hReq & ://www.abcabc.ca/ & thisAlias & /includes/ & section & .asp? & request.ServerVariables( QUERY_STRING )

set objHTTP = Server.CreateObject( WeOnlyDo.wodHttpDLXCom.1 )
objHTTP.LicenseKey = XXXXX
objHTTP.Blocking = 1
objHTTP.Authentication = 0
objHTTP.AutoRedirect = 1
objHTTP.Compression = 1

For Each name In Request.ServerVariables
if left(name,5) = HTTP_ then
objHTTP.Request.Headers.Add name,Request.ServerVariables(name)
end if
Next

For Each name In Request.Cookies
objHTTP.response.Cookies.Add name,Request.Cookies(name)
Next

objHTTP.URL = URL
if left(lcase(URL),5) = https then
objHTTP.Secure = 2
objHTTP.Port = 443
else
objHTTP.Secure = 0
objHTTP.Port = 80
end if
objHTTP.Timeout = 20
objHTTP.GET

If objHTTP.Response.StatusCode = 200 Then
HEADER_TEXT =
HEADER_TEXT = HEADER_TEXT & objHTTP.Response.Body
Else
HEADER_TEXT = <span style=color:#CCCCCC;>ERROR: & section & could not be retrieved.</span>
End If

objHTTP.Disconnect
Set objHTTP = Nothing
[/code]


Complete thread: