I have been specializing in building web-based applications since 1998, primarily using HTML, Flex, LiveCycle, Java, ColdFusion, and SQL Server. You found yourself here, so hopefully you'll get something good out of it! Enjoy...
Saturday, January 10, 2009
LiveCycle Authentication with ColdFusion
More importantly, you can use the assertion string to implement SSO with SAML. Once you have the assertion, you can call validateAssertion on the same service to validate the user and get their information. In other words, you can perform the authentication using ColdFusion, and then for example, pass the assertion to your flex app so that you don't force the user to authenticate again.
<cfset username = "administrator">
<cfset password = toBase64('password')>
<cfsavecontent variable="xml">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:authenticate xmlns:m="http://adobe.com/idp/services">
<m:username><cfoutput>#username#</cfoutput></m:username>
<m:password><cfoutput>#password#</cfoutput></m:password>
</m:authenticate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</cfsavecontent>
<cfhttp url="http://servername:portnumber/soap/services/AuthenticationManagerService?wsdl" method="post">
<cfhttpparam type="cgi" name="SOAPAction" value="authenticate">
<cfhttpparam type="xml" name="authenticateRequest" value="#xml#">
</cfhttp>
<cfset xml = xmlParse(cfhttp.filecontent)>
<cfset assertion = xmlSearch(xml, "//*[local-name()='assertion']")>
<cfoutput>#htmleditformat(assertion[1].xmltext)#</cfoutput>
Tuesday, November 28, 2006
ColdFusion Hosting at HostMySite.com
Model-Glue works with their setup out of the box, and they were extremely helpful as we got things setup for the first time. You have to love 24*7 tech support that's actually 'with it'.
My only complaint is that I didn't have access to restore or backup my database, so I had to rely on DTS, although they can do these things for you if you request it. I imagine this is an issue with most shared hosts as SQL Server security surrounding restore and backups isn't easy to hand out to everyone.
Saturday, November 18, 2006
Another ColdFusion Engine?
http://www.smithproject.org/faq.cfm
It sounds like they have quite an uphill battle to get to the level where BlueDragon and Adobe's ColdFusion is. But regardless, this could be interesting if they change it to an open source model and let people run with it.
Thursday, October 26, 2006
CFMX Setup on Vista
First, you need to run the ColdFusion Installer using the Program Compatibility Wizard. This will normally appear after the installer hangs. If it doesn't, the location to create a shortcut with is "%SystemRoot%\system32\mshta.exe res://%SystemRoot%\system32\acprgwiz.dll/compatmode.hta". There are a few options that you are going to want to choose.
- Microsoft 2000 (Using Windows XP will not work)
- On the next screen, choose 256 colors and all of the 'disable' options
- Next, make sure you run this program as an administrator
Prior to setting up the Handler Mappings, you need to download jrun.dll from another installation and make sure that file exists in the following directory : 'c:\cfusionMX7\runtime\lib\wsconfig\1' -- You may want to simply copy the entire "1" directory under wsconfig.
Thursday, October 12, 2006
CreateTimeSpan() and Session Timeouts
value * 24 * 60
So, to put that in perspective when using session timeouts, the following code would be applicable.
<cfdump var="#evaluate((appinfo.sessionTimeout * 24 * 60))#">
Sunday, September 17, 2006
Working with arguments in Model Glue
iif(local.arguments.event.argumentExists('showAllCompanies'), de(local.arguments.event.getArgument('showAllCompanies')), de(''))
The same code rewritten in the more archaic fashion works perfectly such as:
if( local.arguments.event.argumentExists('showAllCompanies') ){ local.showAllCompanies = local.arguments.event.getArgument('showAllCompanies'); } else { local.showAllCompanies = ''; }
Very frustrating, but then again, an easy workaround once you know it.
Wednesday, April 05, 2006
Missing Template Handler in ColdFusion MX 7
Setting up the missing template handler in ColdFusion MX 7 and actually getting it to work correctly is a little more involved than most would think. Here are the steps to get it set up correctly, and some details that aren't very apparent.
- Open the ColdFusion MX 7 Administrator.
- Determine what error handler should be used.
I needed to setup the missing template handler for http://localhost/client1/. This meant that I needed to use /client1/common/error.cfm as my missing template handler value. The ColdFusion Administrator states to use a relative path, but this is really an absolute path from the webroot (this applies to the site-wide error handler as well). - Create a ColdFusion Mapping for this virtual directory.
While attempting to do the above, the administrator kept telling me that the site wide administrator does not exist. To rectify this, you need to temporarily setup a ColdFusion mapping with the following attributes.
Logical Path: /client1
Directory Path: [insert path to 'client1' folder here] - Go back to the settings page and hit save. The CF Administrator shouldn't have an issue with your handler at this point in time.
- You then need to setup your website or virtual directory in IIS so that it knows to use the CF 404 page, and that it needs to check for missing files.
Please see http://www.macromedia.com/go/95ee04fb for more information. - Restart IIS and CF and everything should be working.
Items to note:
- Once you setup IIS to check for files, 404 error messages will no longer be logged by ColdFusion. I'm assuming this is because IIS supercedes CF when it comes to 404 errors when configured similar to above.
- When following these instructions, the error handler stays in effect even if the missing template handler is removed from the CF Administrator.
- The ColdFusion Mapping that is required in order to successfully validate the Missing Template Handler value can be deleted once the handler is in place and accepted by the CF Administrator.
Saturday, April 01, 2006
Working with the ColdFusion MX Internal Web Server
- Using the built-in web server
- Disabling the web server
- Changing the default port number
- Changing the root directory
- Enabling different filename extensions
- Disabling or enabling directory browsing
- Adding a default document type
- Adding a virtual directory or web mappings
http://www.macromedia.com/support/coldfusion/adv_development/config_builtin_webserver/




