<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: ASP: Sustain Remote Cookie Sessions in an ASP/VBScript</title>
	<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/</link>
	<description>ls /usr/lolcat</description>
	<pubDate>Sun, 12 Oct 2008 10:42:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: David Luu</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-1190</link>
		<dc:creator>David Luu</dc:creator>
		<pubDate>Mon, 31 Dec 2007 23:22:05 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-1190</guid>
		<description>Thanx for the info Chrissy! :)

For anyone interested, I wrapped Chrissy's method around a slightly different friendly API for VBScript, and for Javascript as well. It might not be perfect but it's a start. The Javascript version is intended to be cross-platform.

Web/HTTP Automation Libraries
http://www.codeproject.com/KB/library/httpautomationlibs.aspx

I'm thinking of doing ports for .NET and Java as well, if needed.</description>
		<content:encoded><![CDATA[<p>Thanx for the info Chrissy! <img src='http://blog.netnerds.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For anyone interested, I wrapped Chrissy's method around a slightly different friendly API for VBScript, and for Javascript as well. It might not be perfect but it's a start. The Javascript version is intended to be cross-platform.</p>
<p>Web/HTTP Automation Libraries<br />
<a href="http://www.codeproject.com/KB/library/httpautomationlibs.aspx" rel="nofollow">http://www.codeproject.com/KB/library/httpautomationlibs.aspx</a></p>
<p>I'm thinking of doing ports for .NET and Java as well, if needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Sanford</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-942</link>
		<dc:creator>Marcus Sanford</dc:creator>
		<pubDate>Mon, 12 Nov 2007 16:42:53 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-942</guid>
		<description>Hi Chrissie - I am trying to get this to work with session variables as 
well as cookies so I've got
xmlhttp.setRequestHeader "Cookie", "LOGGED=xxxxxxxxxx"
xmlhttp.setRequestHeader "Cookie", "MYID=xxxxxxx"

works fine - however how do I get this to run with session variables 
is it just a case os writing 
xmlhttp.setRequestHeader "Session", "MYSession=xxxxxxx"

any help would be really great

Many thanks

Marcus</description>
		<content:encoded><![CDATA[<p>Hi Chrissie - I am trying to get this to work with session variables as<br />
well as cookies so I've got<br />
xmlhttp.setRequestHeader "Cookie", "LOGGED=xxxxxxxxxx"<br />
xmlhttp.setRequestHeader "Cookie", "MYID=xxxxxxx"</p>
<p>works fine - however how do I get this to run with session variables<br />
is it just a case os writing<br />
xmlhttp.setRequestHeader "Session", "MYSession=xxxxxxx"</p>
<p>any help would be really great</p>
<p>Many thanks</p>
<p>Marcus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Shen</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-232</link>
		<dc:creator>Steve Shen</dc:creator>
		<pubDate>Mon, 24 Sep 2007 23:14:51 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-232</guid>
		<description>Great script! Thanks for sharing!

One suggestion...  Since response headers may not always contain "path=/", it could be "Path=/"( with capital "P"), make the instr() not case sensitive would be a fix:

theCookie = left(hArr(kk),instr(hArr(kk),"path=/")-2)

change to:

theCookie = left(hArr(kk),instr(1,hArr(kk),"path=/",1)-2)</description>
		<content:encoded><![CDATA[<p>Great script! Thanks for sharing!</p>
<p>One suggestion...  Since response headers may not always contain "path=/", it could be "Path=/"( with capital "P"), make the instr() not case sensitive would be a fix:</p>
<p>theCookie = left(hArr(kk),instr(hArr(kk),"path=/")-2)</p>
<p>change to:</p>
<p>theCookie = left(hArr(kk),instr(1,hArr(kk),"path=/",1)-2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete D</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-231</link>
		<dc:creator>Pete D</dc:creator>
		<pubDate>Mon, 18 Jun 2007 03:17:44 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-231</guid>
		<description>Hi Bruno,

I had a similar need and a similar problem hence me finding this page. I think I've found out why it won't work but it might not help you. Its seems that only one page can have access to a users session space at one time but you (or we) are trying to access it in both pages. As a result the second page hangs while it waits for the firstpage to finish processing and release the session but it can't as the first page is waiting for the second to finish running...dead lock. Thats whats causing this method to not work. The only way around it  I've found is to switch off sessions in the first page, the calling page then the second page has access to the session space. Not perfect but it might serve your needs it did mine. You can switch it off by add this line to the top of your page:



* If you already have a</description>
		<content:encoded><![CDATA[<p>Hi Bruno,</p>
<p>I had a similar need and a similar problem hence me finding this page. I think I've found out why it won't work but it might not help you. Its seems that only one page can have access to a users session space at one time but you (or we) are trying to access it in both pages. As a result the second page hangs while it waits for the firstpage to finish processing and release the session but it can't as the first page is waiting for the second to finish running...dead lock. Thats whats causing this method to not work. The only way around it  I've found is to switch off sessions in the first page, the calling page then the second page has access to the session space. Not perfect but it might serve your needs it did mine. You can switch it off by add this line to the top of your page:</p>
<p>* If you already have a</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-228</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Thu, 17 May 2007 15:42:45 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-228</guid>
		<description>To make myself more clear what I want in terms of code is:

========MAIN PAGE========

Dim xmlhttp
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", "myurl.asp", false
session("myString") = "blablabla"
xmlhttp.send ""
response.write = xmlhttp.responseText
set xmlhttp = nothing

=======myurl.asp============

response.write session("myString")

=========================

The thing is: blablabla doesn't get writen on main page. All I want is for this to work.

Sorry about placing to posts for the same thing.</description>
		<content:encoded><![CDATA[<p>To make myself more clear what I want in terms of code is:</p>
<p>========MAIN PAGE========</p>
<p>Dim xmlhttp<br />
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")<br />
xmlhttp.open "GET", "myurl.asp", false<br />
session("myString") = "blablabla"<br />
xmlhttp.send ""<br />
response.write = xmlhttp.responseText<br />
set xmlhttp = nothing</p>
<p>=======myurl.asp============</p>
<p>response.write session("myString")</p>
<p>=========================</p>
<p>The thing is: blablabla doesn't get writen on main page. All I want is for this to work.</p>
<p>Sorry about placing to posts for the same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-230</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Thu, 17 May 2007 15:35:32 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-230</guid>
		<description>Hi,

If I understood your code you send a request for url1 and in urls the session will be created, then you call url2 and in there you can access the session created in url1.

What if i want to create a session in the main page and call serverXMLHTTP, is there a way to do that?
I mean, whithout using a second url?

All I want is that the session created in the main page can be accessed in "url".
In my case, url will not create another session.

I tryed to pass the cookie header like this     XMLHTTP.setRequestHeader "Cookie", request.ServerVariables("HTTP_COOKIE")
but no success.

I would apreciate any help.
Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>If I understood your code you send a request for url1 and in urls the session will be created, then you call url2 and in there you can access the session created in url1.</p>
<p>What if i want to create a session in the main page and call serverXMLHTTP, is there a way to do that?<br />
I mean, whithout using a second url?</p>
<p>All I want is that the session created in the main page can be accessed in "url".<br />
In my case, url will not create another session.</p>
<p>I tryed to pass the cookie header like this     XMLHTTP.setRequestHeader "Cookie", request.ServerVariables("HTTP_COOKIE")<br />
but no success.</p>
<p>I would apreciate any help.<br />
Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raymond</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-229</link>
		<dc:creator>raymond</dc:creator>
		<pubDate>Mon, 14 May 2007 16:52:06 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-229</guid>
		<description>It's not working on Trademe.co.nz.Could you help me out please?</description>
		<content:encoded><![CDATA[<p>It's not working on Trademe.co.nz.Could you help me out please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: china boy</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-227</link>
		<dc:creator>china boy</dc:creator>
		<pubDate>Tue, 15 Aug 2006 23:59:50 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-227</guid>
		<description>great!</description>
		<content:encoded><![CDATA[<p>great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tahir Ali</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-226</link>
		<dc:creator>Tahir Ali</dc:creator>
		<pubDate>Fri, 04 Aug 2006 08:11:44 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-226</guid>
		<description>I need some help regarding how to post viewstate using xmlhttp in asp 3.0</description>
		<content:encoded><![CDATA[<p>I need some help regarding how to post viewstate using xmlhttp in asp 3.0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chrissy</title>
		<link>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-225</link>
		<dc:creator>Chrissy</dc:creator>
		<pubDate>Thu, 01 Jun 2006 16:33:00 +0000</pubDate>
		<guid>http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/#comment-225</guid>
		<description>Hey Shaharyar,
Your current order is
theCookie = httpSessionRequest(&lt;strong&gt;1&lt;/strong&gt;, “GET”, url1,nodata,noCookie, noViewState)

theCookie = httpSessionRequest(&lt;strong&gt;1&lt;/strong&gt;, “GET”, url2, nodata, theCookie, noViewState)

finalHTML = httpSessionRequest(&lt;strong&gt;2&lt;/strong&gt;, “Post”, url3, data1, theCookie, noViewState)
Try doing
httpSessionRequest(&lt;strong&gt;1&lt;/strong&gt;...
httpSessionRequest(&lt;strong&gt;2&lt;/strong&gt;...
httpSessionRequest(&lt;strong&gt;3&lt;/strong&gt;...

instead.</description>
		<content:encoded><![CDATA[<p>Hey Shaharyar,<br />
Your current order is<br />
theCookie = httpSessionRequest(<strong>1</strong>, “GET”, url1,nodata,noCookie, noViewState)</p>
<p>theCookie = httpSessionRequest(<strong>1</strong>, “GET”, url2, nodata, theCookie, noViewState)</p>
<p>finalHTML = httpSessionRequest(<strong>2</strong>, “Post”, url3, data1, theCookie, noViewState)<br />
Try doing<br />
httpSessionRequest(<strong>1</strong>...<br />
httpSessionRequest(<strong>2</strong>...<br />
httpSessionRequest(<strong>3</strong>...</p>
<p>instead.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
