Category: ColdFusion
RDS: Server name or address could not be resolved...
This problem has plagued me for ages. After setting up a new site on my server, I could never reliably connect to any of the sites with RDS. Only a very few of the first sites that were set up on the server. I've been back and forth with Dreamweaver engineers and no one could ever seem to solve the problem. I spent an hour going through Google this evening, and no one had a sure fire fix for this ridiculously unhelpful error message...
Well I finally just decided to take a step back and take a better look at what was going on. I went back and looked at the installation log file that ColdFusion created when I installed it on my IIS box. I started following the same steps on my new site that I was having issues with. I had already added the CFIDE directory, but when I logged into my new site through /CFIDE/administrator, there was no RDS Password option available. When I logged in through one of my early sites on the box, sure enough, there was the RDS Password option. Both of these sites were using the same virtual CFIDE directory, so it wasn't a missing/corrupt file in the CFIDE directory.
Finally, it jumped right out and slapped me in the face. None of my new sites had the JRunScripts virtual directory... I mapped the JRunScripts virtual directory to C:\CFusionMX\runtime\lib\wsconfig\1 [with Execute Permissions set to Scripts and Executables (not Scripts Only my friends...)] and wallah! The RDS Password option popped up on my new site, and sure enough, I connected through RDS with absolutely no problem... I can't believe how long it's taken me to figure this one out, and it was something so silly. Hopefully this shows up high enough on Google so that someone else doesn't have to deal with it :).
Transforming XML Server-Side
Angela and I gave a presentation to the Mid-Michigan CFUG yesterday (well actually Angela gave the presentation, and I just showed some XSL stuff), and I showed everyone how to use the new XSLT visual authoring tools in Dreamweaver 8. They're great and wonderful and everything, but they're really geared towards working with local XML files. The reason I say that, is that Macromedia doesn't offer any solutions for transforming a remote XML file. They allow you to write an XSLT file to transform that remote content, but they don't tell you how to actually pull a little Optimus Prime on it and make that XML human readable.
So, I thought I'd share some code to make this happen. It's ridiculously simply once you see it, but I've run into quite a few people that just haven't been able to put all of the pieces together. So, here's some ColdFusion code to grab MM's DesDev feed and transform it using an XSL file on your own server:
<cfsilent> <cfhttp url="http://weblogs.macromedia.com/dev_center/index.rdf" method="get" /> <cfset xmlObj = XMLParse(cfhttp.FileContent) /> <cfset xslPath = ExpandPath("mmdesdev.xsl") /> <cffile action="read" variable="xsl" file="#xslPath#" /> </cfsilent> <cfoutput>#XMLTransform(xmlObj, xsl)#</cfoutput>
Yep, believe it or not, that's all that it takes. You just read in the XML file from the server somewhere out there in internet land, convert it to an XML Object using XMLParse, and then read the XSL file from the server, and transform it all using the XMLTransform function. Can I say I love ColdFusion? Here's the same work done with ASP:
<% Dim xmlDocument, xslDocument set xmlDocument = Server.CreateObject("MSXML2.DOMDocument.4.0") set xslDocument = Server.CreateObject("MSXML2.DOMDocument.4.0") xmlDocument.async = false xmlDocument.setProperty "ServerHTTPRequest", true xmlDocument.load("http://weblogs.macromedia.com/dev_center/index.rdf") xslDocument.async = false xslDocument.load(Server.MapPath("mm.xsl")) Response.Write xmlDocument.transformNode(xslDocument.documentElement) %>
Look Ma, I'm Famous Too :)
My little lady was on the tube the other day, and now I'm famous too.
There are also lots of other interviews up on the site. Most of them run around 5 minutes, so there's no excuse for not watching them ;)