| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Session Variable with Security Web Server |
| N/A | posted November 14, 2000 10:43 AM Hi, Is there anyone help me with following question ? I am using Web Tool in my vb project to connect a security web server to get some informatioin. The question is each time the server issue a session variable which will expired when you close your browser. But right now I am using vb project rather than browser, so it seems issuing a new session variable each time when I connect to the server. Does the Web Tool have any way to keep the session variable just like a browser from my vb project? Thank you in advance. Ben |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 14, 2000 10:51 AM The session variable is most likely a header line that comes back when you first request the page. You should probably be saving this session variable and adding it to subsequent requests. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted November 14, 2000 11:10 AM I believe you can see the session id if you set the Cookies Property to False, and then view the returned Headers after your first request. |
| N/A | posted November 14, 2000 12:27 PM Thank you for your prompt answer. Yes, I can see the session id if I set the cookie as false. I also try to save the session id and send back as a request header as I get/post something but it did not work. Because each time when you connect to server it issued a new session id. Is there any way to hold the session just like a browser? Another thing it seems the web tool downloaded is expred, do I have to unregist all those dll and then reinstall them again? I am very sure if this web tool is work with this project we will buy it. Please help! Ben Cheung |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 14, 2000 1:07 PM There's probably a headerline like "X-Referer" ot "Referer" that needs to be set. The only way to find out exactly what needs to be done is to use a "sniffer" to monitor an IE or Netscape session. To reset the trial, just reinstall the Tool. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted November 14, 2000 1:13 PM How did you send the id as a request header? If you add a header: "Cookie: <what was set as session id during first request>" I think it should work. |
| N/A | posted November 14, 2000 2:31 PM Thank you for your reply. 1) I have used following codeing to set the header: objtcp.Security = 63 objtcp.Redirect = True objtcp.Url = "https://www.mywebsite.asp" objtcp.Cookies = False objtcp.Head objRqHeader strSession = objRqHeader.Item("MyCookie") ... coding to process strSession strSession = Replace(strSession, "=", ": ") header.Add strSession objtcp.Post strData, header, strContent, strRespseH Text1 = strContent 2) How can I monitor the IE/Netscape session? Do you have some way to do that? Ben Cheung |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 14, 2000 2:56 PM You need a sniffer or protocol analyzer. I can't recommend any since the one way use (Packetware) is no longer sold. Sorry I could not help further. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted November 14, 2000 2:58 PM I would try something like: Http1.Post PostString, , Data, ResponseHeaders For x = 1 To Headers.Count If Mid(ResponseHeaders(x), 1, 11) = "Set-Cookie:" Then id = Right(ResponseHeaders(x), Len(ResponseHeaders(x)) - 4) End If Next RequestHeaders.Add id |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|