Bindings not Working on ColdFusion Server

cache web paths option + Adobe CF logo

Just a quick note here. If you are running ColdFusion and you know that your bindings are set up correctly, but web requests being sent to the default root of websites on your server other than the intended one, it it highly likely that the “Cache web server paths” option was mistakenly (or unwittingly) set, causing all manner of havoc in directing among multiple sites.

CFCaching Web Server Paths option

Turn it off, restart the ColdFusion Application Server service, and enjoy proper web routing once again!

Connecting to an Oracle Database RAC with ColdFusion 11

Adobe ColdFusion logo

Recently we’ve been moving quite a few servers and databases into our new datacenter, so I’ve been having to learn – more quickly than usual – about the often obscure differences between older and newer versions of various software including Solaris and Oracle Database.

A change to an Oracle RAC system caused the most interesting trouble I’ve had so far during this move.

In ColdFusion 11, there are native JDBC drivers for Oracle that are normally selected in the Data Source Management page using the logical and expected “Oracle” selection.

ColdFusion Data Source Management page

However, I was chagrined to find out that if you use this to try to connect to an Oracle Database that is load balanced with RAC, this selection will not work. Upon trying to connect, you will receive the error:

“[Macromedia][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused, the specified SID (whatever string you put in the SID field) was not recognized by the Oracle server”

Neither Oracle nor Adobe documentation was much help on this. Fortunately, I came across a thread on the Adobe forum where a user was having this problem.

The answer is to, instead of selecting “Oracle”, select “other” in the Driver drop-down list. Then, use this connection string. The last variable (AlternateServers), appears to be optional. I’m not certain whether or not the IP addresses also need to be enclosed in parentheses.

jdbc:macromedia:oracle://(ORACLE SERVER):1521;SERVICENAME=(serviceName);sendStringParametersAsUnicode=false;MaxPooledState ments=1000;AlternateServers=((IP ADDRESS1),(IP address 2))

This is basically how I ended up setting the connection up:

CF other driver for Oracle RAC

Scheduled Tasks and Anonymous Access in ColdFusion 11

ColdFusion Scheduled Task setup form

I have been converting applications from ColdFusion 8 to CF 11 over the last several months, and some of the challenges have been quite a bit more daunting than this one. Even so, I felt this was worth mentioning.

After copying all the code for my most recent upgrade candidate from the old server to the new one and setting it up in IIS, I proceeded to set up the CF Scheduled Tasks on the new server.

One of the tasks that I set up runs under a blank user name. In order for that to work, you have to make certain that several settings related to authentication are set properly in IIS. First of all, if the app as a whole runs under anything other than Anonymous Authentication (such as Windows Integrated Authentication or Forms Authentication), your Scheduled Task URL will have to be inside a folder that has Anonymous Authentication enabled, even if it’s turned off for the rest of the app.

Secondly, you have to make sure that the “jakarta” virtual folder that is set up during IIS configuration of the website also has Anonymous Authentication enabled.

Having Anonymous Authentication disabled on the jakarta folder will cause no end of irritation if you don’t have the output of the URL sent to a file, as neither the application log file nor the Security log in Windows Event Viewer will tell you exactly why the task is failing. If you send output to a text file, you can rename that text file with an HTML extension (I’m still not sure why Adobe doesn’t just allow output as HTML for this…) and then see more clearly why your task was failing.

IIS authentication error

So set your authentication properties correctly to avoid this frustration!