All,
Collin Tobin helped me with my last problem off-list but I came
across another strange problem. We have an RIA (FMX/CFMX) that
initializes a gateway connection and then does a setCredentials() with
an authorization string. The ColdFusion server catches the
authorization code and logs in the user for that call to the server like
this:
<!---------------------------------->
<cflogin>
<cfif IsDefined(�cflogin�)>
<cfset authCode = cflogin.name />
</cfif>
</cflogin>
<cfif IsDefined(�authCode�)>
<cfloginuser name=�#authCode#� password=��
roles=�role1,role2,etc� />
</cfif>
<!---------------------------------->
(Note that the <cfloginuser /> is not in the <cflogin /> because I don't
want to maintain a session on the server-side but rather with Flash
Remoting headers)
This code works great all the time except for the first time that we
call the CFCs on the server after not using the app for a while. I
checked the NetConnection Debugger and it gives me something like this
for the first call:
-> Connect - http://www.mysite.com/flashservices/gateway
-> AddHeader - Credentials
-> Call - myCFC.myFunction( myarg1, myarg2)
-> Connect -
http://www.mysite.com/flashservices/gateway?CFID=32192&CFTOKEN=098401843
The result for that Call comes back ok, but every subsequent call errors
out with a "User not authorized" error.
Then when I close the app and go back in, it gives me this in the
NetConnection Debugger:
-> Connect - http://www.mysite.com/flashservices/gateway
-> AddHeader - Credentials
-> Call - myCFC.myFunction( myarg1, myarg2)
And everything returns without an error. I assume that the reason this
happens is that there is a new session initialized and my Flash Remoting
headers are erased. I figure I could do a call to a function that
doesn't do anything and then set the credentials, but that's just ugly.
Anybody have a better way around this?
Thanks.
Ben Johnson
Information Architect
www.architekture.com
[p] 720.934.2179
�
�
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists