ColdFusion Muse

The Infamous "Connector" Scripts and Your Default Document

Flash remoting is supposed to be enabled by default. Indeed, if you set up a web server, add some sites and then install CFMX flash remoting works fine. If, however, you are in the habit of adding new sites to your IIS server that are going to use flash remoting, it may not work. A virtual directory to JrunScripts and some other settings are missing. The fix? Well, one easy "shotgun" approach is simply to run the connector script. It sets things up correctly and remoting starts to work. But (as is often the case) there is a small issue you might run into.

Let's say you have a Coldfusion site that also contains HTML pages. Let's also surmise that one of those HTML pages is "index.html" (this scenario could also apply to pages like default.asp or index.php etc.). So, in your root directory you have index.cfm and index.html. What does your "default document" setting look like? It looks like this:

index.cfm
index.html
index.htm
default.asp
....

...that doesn't cause any problems because when someone goes to the "/" they get the top choice - index.cfm. They would have to specify "index.html" to see the html page.

The problem

When we run the connector script we first "remove" and the "add" the site. The process of removal takes out the "index.cfm" from the list of default documents, then adds it back in. The problem is that it is added back in at the bottom of the list. In the case of the list above it would look like this after running the script:

index.html
index.htm
default.asp
....
index.cfm

Suddenly the site is serving "index.html" as the default page. It is necessary to log in to IIS and move "index.cfm" to the top to get it to display as the default again.

The Fix

The real fix is to be aware of this issue so it doesn't come up. You should be prepared as a part of your connector script running procedure to navigate to the IIS properties and adjust the default document order of precedence. You could also remove the other documents leaving only .cfm - or you could make sure that there are not copies of these other documents in the root folder.

  • Share:

0 Comments