Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Persist Session over MSXML2.ServerHTTP.3.0 for login validation (ASP)

Posted on 2006-06-11
4
Medium Priority
?
357 Views
Last Modified: 2007-12-19
Hi ,
THis problem has been bugging me all morning. I've been searching already here and many other locations but noone seems to have had exaclty the situation i have, so here goes! :o)

I am loading a login form over XMLHTTP using MSXML2.ServerHTTP.3.0.
I can get the page to load, and the form to submit and log in the user, but the session is not the same as the one used for the main website, so I need a way to send the login page the correct SESSIONID.

I am using ASP/IIS/MySQL (for user authentication)

I've got as far as including the following:

vCookies = CStr(Request.ServerVariables("HTTP_COOKIE"))
oXMLHTTP.Open "POST", vDoc, False
oXMLHTTP.SetRequestHeader("Cookie") = CStr(vCookies)
oXMLHTTP.SetRequestHeader("Cookie") = CStr(vCookies)

However as soon as I add the SetRequestHeader lines the whole web page refuses to load, returning:

Error Type:
msxml3.dll (0x80072EE2)
The operation timed out
/functions/systemClasses/XSLTransformClass.asp, line 133

My XMLHTTP request is happening server side (no client side js/vbscript). If there are any Request.Form values sent to the main page these are passed to the HTTP Request using
oXMLHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

If i remove the SetRequestHeader lines it all works again ,but with no session persist. If i view the login page directly, after logging in, the authenticated session is valid, and it tells me i am logged in.

Please can someone shed some light on this?!

Many thanks in advance
0
Comment
Question by:wildtangent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
huji earned 1500 total points
ID: 16881888
I'm not sure if the following will answer your question. I just recommend you take a glance, if you haven't reach this in your own searches:

http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/

Wish I can help
Huji
0
 

Author Comment

by:wildtangent
ID: 16882213
Hi, thanks this may actually be the only reasonable way to achieve this - I will try it out tomorrow and see how i get on.  I managed to get it to accept the cookie without timing out by adding Server.URLEncode(vCookies), but this doesn't pass the authenticated session back to the main page (i probably need to do the above!)

- any more suggestions? Thanks!
0
 
LVL 14

Expert Comment

by:huji
ID: 16888141
Well, I ran out of suggestions! ;) Let's see if the above solves it or not. If not, we will take the next steps.
Wish I can help
Huji
0
 

Author Comment

by:wildtangent
ID: 16934181
Hi huji - ended up using your method suggested so i guess you get the points! It certainly works, just a bit slow - am looking at LDAP authentication for this in future.... Many thanks, as the resource you specified was a lot more concise and accurate than many!!

Best,

Joe
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Loops Section Overview

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question