Solved

USING COOKIES FROM A DELPHI APPLICATION combined with ASP

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 93
select query - oracle 16 101
enhance the following code 3 42
FMX TEdit KeyUp handler detecting  "enter" key 4 41
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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