ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Create a Highly Available Database Solution. Advantage Database Server can provide the availability to keep your data safe and ready for your application and users.
  #1  
Old September 8th, 2003, 08:57 AM
cdddiment cdddiment is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 cdddiment User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cfhttp and keeping session id's

Hi, I have some coldfusion which does a CFHTTP to another page on another server. The other page is in ASP which also uses a COM object. The COM object relies on a constant SESSIONID.

If I use cfhttp then the session id in the ASP script changes every time because CFHTTP is a new session each time it is used the next time around (that is the coldfusion page has a link to itself which calls the CFHTTP again).

I've tried using CFHTTPPARAM to set type CGI name SESSIONID to change the HTTP_SESSIONID in the header, but this has no effect on the session id (retrieved in ASP using session.sessionID) though it comes back using request.servervariables("http_sessionid") but again, the COM object only see's what the ASP sevice has identified as the current Session ID and not what came in the header.

Does anyone have any solution. It's pretty urgent so any help would be greatly appreciated!

Cheers,
Craig.

Reply With Quote
  #2  
Old September 9th, 2003, 08:17 AM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,474 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 16 h 54 m 28 sec
Reputation Power: 42
Can you not just pass the ASP Session ID in the URL that you are using in the CFHTTP call?

Reply With Quote
  #3  
Old September 9th, 2003, 09:06 AM
cdddiment cdddiment is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 cdddiment User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
That was pretty much what I thought I was doing, but I had the whole situation confused. I solved it because I realised that ASP uses a completely different format of SESSION ID in two ways, i.e. session.sessionid brings back a different ID to that supplied through the HTTP Header and the cookie ID.

Simply put, if I set the sessionID being passed to ASP as a cookie then the ASP uses that, if I dont supply one, ASP creates one, which you can recover in CFM by looking at the returned header after the CFHTTP.

So to solve it, I had to do a call to a pretty much empty ASP script using CFHTTP, that returns a http header with a new cookie with the session ID (found by looking at the cookie "SET-COOKIE" and extracting the cookie marked ASPSESSIONIDblah blah..
Now I have it, I then use CFHTTPPARAM of type cookie on my next call to the real ASP script I want. The ASP script picks this up and so does the COM object which needs it.

On the next time to the first CFM page, I just check if I need a new cookie/sessionid or not and dont do the initial CFHTTP if it's not the first time around.

I got to be fair, though it works it is completely full of server overheads and would make more sense if it the ASP was converted to CFM in this case, but I dont have that luxury at the moment.

Thanks for the suggestion

C.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > cfhttp and keeping session id's


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway