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

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

by Don, Sunday, March 08, 2009, 03:50 (5739 days ago) @ wodSupport

I grabbing from ASP the current header items and passing them to HttpDLX.

I can not pass HTTP_ to the COM, otherwise it returns on the other side as HTTP_HTTP_HOST and not HTTP_HOST. Thus, I have to remove HTTP_ from the original header item name.

[code]
For Each name In Request.ServerVariables

'capture only HTTP_ header items
if left(name,5) = HTTP_ then

'strip HTTP_ from header item name
varName = mid(name,6,len(name)-5)

'repace _ with - for header add by HttpDLX
varName = replace(varName, _ , - )

if name = HTTP_COOKIE then
'capture cookie items from header for header add by HttpDLX
cookieStr = cookieStr & name & = & Request.ServerVariables(name) & ;

'add cookie item
objHTTP.request.Cookies.Add Request.ServerVariables(name) &
else
'add header item to HttpDLX
objHTTP.request.Headers.Add varName, & Request.ServerVariables(name) &
end if
end if
Next

'add header cookie items to HttpDLX
objHTTP.request.Headers.Add COOKIE , & cookieStr &
[/code]


Complete thread: