Solved

USING COOKIES FROM A DELPHI APPLICATION combined with ASP

Posted on 2004-08-30
2
230 Views
Last Modified: 2010-04-05
Hi there,

we have an internet site running on Win 2K written in ASP. It is a statistics page where users have to enter their username and password for retrieving their specific data. On that page, there is an option to login automatically. The site writes a cookie in this case to the local PC and next time the site detects this cookie and logs is automatically. Now we have written a DEPLI app that automatically goes to that site. This application should login automatically. So we have to put the cookie on the local PC so that the site detects it. How can we put the cookie on the local machine from out Delphi?
Or is this just not possible??

0
Comment
Question by:TDDatATS
[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 Comments
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 11931996
are you using a TWebBrowser component to go to that site from Delphi?
if you are, you already have the cookie, the only "problem" now is to see how they implemented the "automatic" login, some pages provide a button like "login as whatever" or "enter a new user name", in which case all you need to do is push that button and you'll be redirected...

so,
- what are you using (from Delphi) to access the site and
- how is the "automatic" login implemented?
0
 
LVL 2

Accepted Solution

by:
DarkCore_ earned 125 total points
ID: 11932465
Better to try to fight with internet explorer to set a cookie, is let internet explorer set it.

 For example, you can use a "encryption" algoritm to set the user-name + password and an aleatory "hash" and the localtime, launch the explorer and pass it to a webpage ( http://myserver/autologin.cgi?param=xxxxxxxxxxx&hash=yyyyyyy&localtime=zzzzzz ) and let the webpage confirm this convination is correct and set the cookie and autologin.

Why this? surely you log-in using session variables, and session must be started at server. If you set a cookie with a session not created from server, it will be invalid.

Edu
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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