Solved

USING COOKIES FROM A DELPHI APPLICATION combined with ASP

Posted on 2004-08-30
2
226 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
Delphi XE2 application frozen on Windows 10 10 270
When I am typing into a TEdit last word repeats 7 117
Delphi XE10 Round Image 2 76
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now