BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CGI Script Can't Find Cookie

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet WebSnap
View previous topic :: View next topic  
Author Message
John Kraft
Guest





PostPosted: Sat Feb 04, 2006 4:52 am    Post subject: CGI Script Can't Find Cookie Reply with quote



I'm relatively new to Delphi, so this might be a simple question,
but...

I'm developing a cgi web app using Delphi 6 on WinXP/IIS5.1. It is
not a root level application. The URL looks like:
http://localhost/TradingPost/ I set up IIS so that the local path is
C:\Inetpub\wwwroot\TradingPost, and the application name is
TradingPost. I then set up the default document to be my cgi
executable (TradingPost.exe). I have also set up a default action in
the application itself. I set the cookie with this code:
Response.SetCookieField(cookie, '', '', -1, false);

I set up IIS this way so that when someone types in
http://localhost/TradingPost, it will fire the default action of the
exe. This appeared to be working fine until I tried to implement a
login page using cookies. Now I am observing some unexpected
behavior. The following is a summary of that behavior.

Cookie Set:
http://localhost/TradingPost/ yields the login page
http://localhost/TradingPost/TradingPost.exe yields the login page
http://localhost/TradingPost/TradingPost.exe/ yeild the user page
(Correct behavior).

I expected the short URL to work same as the long one since I set the
default document to the executable. Additionally, the correct default
action fires every time; it just can't find the cookie. Does anyone
know WHY the application behaves this way, and if there is a way to
get the behavior I desire?

Thank you,

John
Back to top
Adge
Guest





PostPosted: Tue Feb 07, 2006 7:02 pm    Post subject: Re: CGI Script Can't Find Cookie Reply with quote



use 127.0.0.1 instead of localhost


"John Kraft" <jhkraft (AT) barbecueguy (DOT) com> wrote in message
news:g7q7u1l48ifg736vd6emvqmme1fjk3amdr (AT) 4ax (DOT) com...
Quote:
I'm relatively new to Delphi, so this might be a simple question,
but...

I'm developing a cgi web app using Delphi 6 on WinXP/IIS5.1. It is
not a root level application. The URL looks like:
http://localhost/TradingPost/ I set up IIS so that the local path is
C:\Inetpub\wwwroot\TradingPost, and the application name is
TradingPost. I then set up the default document to be my cgi
executable (TradingPost.exe). I have also set up a default action in
the application itself. I set the cookie with this code:
Response.SetCookieField(cookie, '', '', -1, false);

I set up IIS this way so that when someone types in
http://localhost/TradingPost, it will fire the default action of the
exe. This appeared to be working fine until I tried to implement a
login page using cookies. Now I am observing some unexpected
behavior. The following is a summary of that behavior.

Cookie Set:
http://localhost/TradingPost/ yields the login page
http://localhost/TradingPost/TradingPost.exe yields the login page
http://localhost/TradingPost/TradingPost.exe/ yeild the user page
(Correct behavior).

I expected the short URL to work same as the long one since I set the
default document to the executable. Additionally, the correct default
action fires every time; it just can't find the cookie. Does anyone
know WHY the application behaves this way, and if there is a way to
get the behavior I desire?

Thank you,

John
Back to top
John Kraft
Guest





PostPosted: Wed Feb 08, 2006 5:02 pm    Post subject: Re: CGI Script Can't Find Cookie Reply with quote



On Tue, 7 Feb 2006 18:22:52 -0000, "Adge" <me (AT) nospam (DOT) com> wrote:

Quote:
use 127.0.0.1 instead of localhost

Thanks, but no effect. I've already implemented a workaround. I

created a default.htm file with a meta redirect to the correct page.
Works fine for what I want.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet WebSnap All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.