• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Default document not being processed when not included in URL

Engaged ,
Nov 01, 2012 Nov 01, 2012

Copy link to clipboard

Copied

Running ColdFusion 9,0,1,274733 on JRun (J2EE install), Windows Server 2008 R2, Java 1.6.0_22

Has anyone else had a problem getting the default document, index.cfm, to work with ColdFusion? I'm assuming that this is only an issue because of our setup; different web server (IIS) and application server (ColdFusion). I can't imagine we are the only ones running this configuration. Are we?

So here is the issue.

If we request http://mysite.com/test/index.cfm it works.

If we request http://mysite.com/test/ it does not work and we get a 404.

I checked the web connector's log file on our IIS server and can see that it is sending the request to our ColdFusion server. The ColdFusion server is sending back the 404 error code but I can't figure out why. We have the default document set on our IIS server for index.cfm. We also have the <welcome-file-list> set to include index.cfm on our application server (web.xml).

From our web connector's log when we do NOT include index.cfm:

2012-11-01 13:37:22 jrISAPI[4544:3600]  ***HttpExtensionProc for JRun ISAPI Extension: uri is "/test/"

2012-11-01 13:37:22 jrISAPI[4544:3600]     HTTP_HOST: servername

2012-11-01 13:37:22 jrISAPI[4544:3600]  filtering /test/ (/test/) HOST=servername

2012-11-01 13:37:22 jrISAPI[4544:3600]  filterRequest:   no match

2012-11-01 13:37:22 jrISAPI[4544:3600]  ExecUrl: request received: URL=/test/

2012-11-01 13:37:22 jrISAPI[4544:3600]  ExecUrl Completion: 404, ErrorCode=2, URL=/test/.

From our web connector's log when we do include index.cfm:

2012-11-01 13:49:02 jrISAPI[9936:3600]  ***HttpExtensionProc for JRun ISAPI Extension: uri is "/test/index.cfm"

2012-11-01 13:49:02 jrISAPI[9936:3600]     HTTP_HOST: servername

2012-11-01 13:49:02 jrISAPI[9936:3600]  filtering /test/index.cfm (/test/index.cfm) HOST=servername

2012-11-01 13:49:02 jrISAPI[9936:3600]  filterRequest:   matched *.cfm

2012-11-01 13:49:02 jrISAPI[9936:3600]  ***IISWorkerThreadProc for JRun ISAPI Extension: uri is "/test/index.cfm"

2012-11-01 13:49:02 jrISAPI[9936:3600]     ALL_RAW: Connection: Keep-Alive Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application (553)

2012-11-01 13:49:02 jrISAPI[9936:3600]  Headers and Values:

... and much more ...

We have gotten around this issue by using the URL Rewrite module in IIS to append index.cfm to the URL. It works but my gut keeps telling me that we should not need to do that for such basic functionality.

Is anyone else having this issue? How have you gotten around this?

Views

19.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

FIXED!

I added an entry for *.cfm to the hnadler mappings for the domain in SCRIPT MAPPINGS

I'd tried this previously and it did not work, maybe I picked the wrong type and not SCRIPT MAPPINGS

So it looks like there are three of them to add for CFC, CFM and CFML

That\s a big of a kicker if I have to add them manually to each and every domain, something must be going wrong in the install process

Any ideas how I can add this globally without a ton of manual work?

Thanks

Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

What I've always done is simply uninstall all connectors, then reinstall them again. That's always worked for me. But if it doesn't work for you, you'd have to make edits to the server configuration directly. In IIS, there are two places where these edits might go: web.config and applicationHost.config. There's also a tool to let you apply changes to IIS via the command line, called appcmd.exe. That's what I'd look at if I had to do it manually.

Dave Watts, CTO, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

I wonder if it's the way I've set up the domains in IIS. If I can get them all under the default site, it would add them, it's just ignoring the domains that are not listed under the default.

Cancel the above idea, that won't work the sites/domains need to be added in separately so that the bindings etc can be set

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

To add to this, I have some domains that show up under DEFAULT SITE, they have the handlers, but they are also in IIS outside of the default site and there are others that are not under the default.

None of them outside of the default of the handlers

I ran the CF web configuration tool on ALL sites, it didn't add them

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

"To add to this, I have some domains that show up under DEFAULT SITE, they have the handlers, but they are also in IIS outside of the default site and there are others that are not under the default."

I don't know what this means.

Dave Watts, CTO, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

Can I email a screenshot directly to you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

Sure. I can't guarantee I'll respond immediately, though. My email address is dwatts@figleaf.com.

Dave Watts, CTO, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

I realise what I had done, while playing around I set the default web site to the root of where all my sites are (outside of %SystemDrive%\inetpub\wwwroot ) , which then showed all my directories, and most likely exposed the secure areas, I've put it back as is.

So what I was looking at was the default web site is getting the correct connectors, but none of my domains are getting them

As I have about 40 domains in there due to some sub domains, manually adding them would be a massive p.i.t.a.

I don't understand why CF's installer is not putting them in.

Is there no way in IIS to globally apply them to all domains?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

I will shoot a screenshot over to you. Xmas day - 3pm, My wife will kill me if I don't join for dinner! It looks like I'll have to put the snapshot back to get the server going and then start from scratch later on tonight or first thing in the morning.

If I could just get those handlers onto all domains I'd be in good shape

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

Bummer to hear this is messing up your Christmas. Hopefully this will help (and though it's Christmas morning, I had time to offer this reply. Sorry that it's lengthy, but if it was an easy problem to solve, you wouldn't be struggling so.)

The problem is almost certainly the previous configuration of IIS done by CF8 (or CF9). This is nearly ALWAYS a problem when you try to put CF10 or above on a machine that had CF9 or earlier.

There are two things you can check, to confirm what’s amiss. (Fixing these can be a good bit more challenging.) The first is about mime types (and the possibility of their being an AIR mime type). The second is about handler mappings and/or isapi filters (and the possibility that there are left over CF8 mappings that need to be removed). I suspect the latter is why you’re seeing the challenge you are (where you feel you need to configure “every site”.) Let me explain both, as usually both happen if one does.

It’s also important (for solving this problem) to understand some aspects of how IIS configuration works (in terms of the files where the configuration works, and the inheritance mechanism IIS uses).

Some people understand only 1 or 2 of the 3 things above, or find resources only explaining one of the three or only very briefly, and they “try to fix things” and find that it “doesn’t work”, and they wonder why CF doesn’t work, and how anyone ever can get things working…So it takes time to explain things. Hope you’ll stick with me to the end here.

1) First, if you look in IIS at the site that is not working, and you open the “mime types” feature for that site, it will likely list hundreds in alphabetical order. Is there one for “.air”? If so, that’s something from CF9 and before that is nearly always not needed (unless you serve up Adobe AIR apps from that web site).

How do you solve that? Well one way is that you could remove that from the site, and see if things work. For some problems, that is all that is needed.

The other way to solve this problem, if you know that you don’t need the “.air” mimetype for ANY sites, is you could probably remove it from the top-level (server-level), which also has a “mime types” feature. If you remove it from there, and find that it IS gone from the site in question (and better if you find it gone from all sites that you check), then the setting was only there, and was being inherited by all the rest. If that’s it, great.

But if you remove it from the server level, but still find it at the site level, then it means your old CF version (or someone) defined it at the site level. In that case, you would need to remove it from the site level (and all site-level mime type features where it may still exist).

2) BTW, if you may be interested in resolving this by modifying instead the underlying IIS xml config file that controls this, it either be defined either in the web.config of the root of some or all web sites, or it could be defined in the server-wide applicationhost.config (found in C:\Windows\System32\inetsrv\Config). The web.config file would override whatever is in the applicationhost.config. And within that file, there are also a set of elements that represent things at the server level (setting the default for all sites), and then optionally a set of elements at one or more site levels. More on that in a moment, as it’s very commonly a much bigger challenge when one moves from CF9 or before to CF10 or above, on the same machine.

3) The second, common problem is about handler mappings. If you look in IIS for the site in question, at the “handler mappings” feature, do you see any cfm file handlers that point to your CF8? Or if you look at its “isapi filters”, is there one for CF8? If there is, then you want to remove those (any isapi filters pointing to 8, and any and all handler mappings pointing to cf8). But again how you would do that depends on IIS configuration settings and its inheritance.

First, look at the server level, and see if there were either CF8 isapi filters and/or handler mappings there. If so, if you remove those from there, do they then disappear also from the site in question (indeed, all sites)? If so, then great. Test your site. Does it work? If so, great.

If not, then you would need to next check things at the site level, and remove it/them from that site.

And if that’s the case, then THAT’s why you found that it was not enough to just run the CF2016 web server config tool. It only can configure things for “all sites” (which means configuring the server-level settings, presuming things are not over-ridden at any site levels), or it can configure them at each site’s level.

Either way, even that tool may not help if the problem is that you have still CF8-versions (or if someone else had CF9 versions) of the isapi filter and/or handler mapping settings. It doesn’t know to remove those for you.

4) Worse, and the most cause of the kind of challenges you’re describing, is that you may find if you dig into the IIS applicationhost.config file that CF8 had created a separate duplicate settings for EVERY site (this is NOT the way CF10 and above would do it, and they don’t check to see if you previously had that).

Look toward the bottom of the file, and see if there is a “location path” XML element (with possibly several dozen handler elements) for each of many (or all) sites. If so, it’s that the CF8 connector has (or CF9 would have also) duplicated ALL the handlers elements--the handler mappings for each file extension.

The difference is that your CF2016 web connector tool (or anyone with CF10 and above would find that it) instead configures only what it presumes is needed for “all sites” to be configured—it has put in the handlers elements for CF files at the TOP level XML element (the one for location path=””, for “all sites”), while all these subsidiary “locations paths” (one for each site) are STILL pointing the sites to CF8.

I’m not saying this is DEFINITELY your problem, but I have seen it dozens of times over the years.

5) So how would one (who understood and confirmed all the above) fix things? Well, if all the handler elements within each of those lower-level handler elements was confirmed to be identical to each other (and identical to the one at the top level, for “all sites”, at least before the CF10, 11, or 2016 values were added), then all those lower-level handler sections can be removed. THEN the top-level ones will be inherited. Same for the isapi filters.

If they are NOT all identical (at the site level within the applicationhost.config), then instead one would have to surgically remove each of the CF8 handler mappings from each site. Really, though, it's almost always as important to remove the duplicates of all the other mappings. It just is very challenging. (Removing any duplicate isapi filters at the site level within the file should be a good bit easier.)

If all that sounds overwhelming, I will say that I can take your applicationhost.config file and look for and remove the problems above, in likely less than an hour. (Unfortunately, these things can’t be easily modified in an automated fashion…or at least such a tool would need to be quite aware of these possibilities and flexible enough to anticipate and handle all the variabilities.)

6) One last thing: this might possibly have been resolved if before you installed CF10 or above (and before uninstalling CF9 or below), you had run the web server config tool (in your case for CF8) to first REMOVE all the configuration it had done. That MIGHT have set things back to a nice starting point, but in truth many people over the years (since CF8 came out over 10 years ago) have done lots of manual tweaks to get things working, so that even that step might not have gotten things back to a good "square one".

Hope that helps. (And the complexity should explain why you won’t find this to be well-discussed elsewhere.)

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

Hi Charlie

Many, many thanks for taking the time to post such an in-depth response. I'd come to the conclusion that it was a remnant of the CF8 install, but picking it off with no experience of this issue would certainly be a challenge.

It's getting a little late here and I'm concerned I'll end up opening a can of worms late at night, so I'll likely start this bright and early tomorrow and report back on my findings.

You did miss off the other potential step, reinstall the server 😉 . Ummm. I wonder what would happen if I just removed IIS and then put it back.

I'll try to clean up as much as possible and see where it takes me

Happy holiday and thanks again

Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

Well, I would warn that uninstalling iis may not remove the entries in applicationhost.config. It may leave it there presuming it would reuse it if reinstalled. Same (especially) with any web.config files in your site web roots.

Typically the kind of cleanup I do for folks gets them going without losing other possible changes that perhaps should stay in place.  

/Charlie

null


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

Hey Charlie,

I managed to sneak a little more time at the keyboard. I went through all of your suggestions and I found the problem. It is indeed in the applicationhost.config

I noticed that if I add a new domain it works, looking in the applicationhost.config I see the existing domains do indeed have a separate set of settings for the handler at the bottom of the file. There's a lot of information in each of these handlers. I removed ALL the info for one of the domains, and restarted IIS, and it worked the entries for CF not appear in the handler.

The only question is why I have separate entries, did CF8 put them there? My only concern is that if I remove them that there might be some other impact that I'm unware of. I'm hoping to hear that it's likely safe to just remove all of them.

Thoughts?

Cheers

Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 25, 2017 Dec 25, 2017

Copy link to clipboard

Copied

You ask, "did CF8 put them there?" Yes, I said (more than once) in my note that CF 8 likely put them (the duplicate entries) there. It was indeed a long note, and I know it was night for you, so perhaps you skimmed it.

But I also explained that you were NOT simply to "remove all the info" for the domains. I said instead (very carefully) that you needed to compare the handler mappings for the site in question to those at the root (those within the location path="" element), and if (and only if) they were identical (other than the new CF2016 entries now at the root), THEN it was safe to remove those handler mappings.

I then said the same about the isapi filters. I did NOT suggest you just "remove all the info" about the site (at the bottom). But I realize you've been scampering and likely running out of steam and were willing to try anything to "keep it simple". I explained why it may not be simple, but perhaps you lucked out.

If not, I am hopeful that you saved a copy of the file before you edited it, so that you could recover if needed. If nothing else, you could do a more careful evaluation (if you had time and inclination) to assess whether indeed you removed something you should not have.

I said it was a "surgical" effort, and I meant it. Certainly, if one has cancer in their leg, chopping off the leg will take care of the problem. But removing the cancer only would be preferable if indeed it would make the illness go away.

But if you're happy with the result and are back up and running, that's great. 🙂


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 26, 2017 Dec 26, 2017

Copy link to clipboard

Copied

Although I did some editing, I did have a snapshot of the system with the CF8, so I just reverted back to that, so everything went back to where I started.

I've managed to get it going. Here's how it went

In the original CF8 version I checked the applicationhost.config and found that only one instance had <handlers> and that was the default site, there were 40 different entries between <handlers> and </handlers> for this 'site. All the other domains there were absolutely none.

I uninstalled CF8 and installed CF2016. I then checked the applicationhost.config and found that it CF2016 had actually created individual sets of handlers for each and every domain. Each set of handlers had I believe 86 entries and was missing any CFM, CFML etc entries. Checking the default web site I see that it had 93 entries as that was the only one that did have the CF entries

As the domains did not originally have any handler info specific to each domain, I decided to totally remove the info from all domains including the default web site, which was quite a painful manual process (and prone to error as I found out I messed up the XML format first time)

Once all of those handler tags were removed I noticed in IIS that if I opened up the handlers that the CF entries were then in there and there were indeed 93 of them. (no IIS restart required).

I also added a bogus/new domain to see if it set up correctly and sure enough that got the 93 entries in IIS. I opened the applicationhost.config to check it and there were no entries created, so all was well.

The sites immediately started working. I've given them a good test and I can't find any problems at all, so it looks like it fixed it.

The only thing I did not do at the end of this was run the CF configuration tool, as I have a feeling it would just put me back to square one, after all it was CF2016 that was creating all these individual handler entries (and missing out entries in the handler to actually run itself)

Any thoughts of why this might send me into chaos? Or shall I mark this thread as FIX found

Many thanks for all of the help from all of you, I couldn't have done it without you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 26, 2017 Dec 26, 2017

Copy link to clipboard

Copied

Well, I am surprised to hear that this happened with the CF2016 installer (which runs the CF2016 web server config tool). It makes me wonder if there was still some vestige of CF8’s having configured the file (I saw what you said, that there were NOT handlers for each site). I’m saying that there may be some other characteristic state in which the CF8 wsconfig tool/installer may have left things. If you have that original file and want to email it to me (I don’t think providing it here for anyone to see would be wise), I may see something you did not. (And you don’t mention your web.config files. It may be affected by those.)

Also, you say here you uninstalled 8. You do not say (as I said in my first long note in this thread) that you may have experienced a different result (the first time, or in this second attempt) if you RAN THE WSCONFIG TOOL FOR CF8 and REMOVED the connector that the CF8 installation had created. I said that the uninstall of CF8 would not do that for you. (Technically, one would also want to eyeball the IIS config files to ensure no remaining vestiges of CF8 config, since you or someone else could have put some in there manually, which even the CF8 wsconfig tool might not remove.)

So at this point it’s your call if you want to invest more time to understand these things.

But you ask if in your current state of things there would be trouble if you ran the wsconfig tool for CF2016. Maybe, maybe not. We can’t know from the outside. But I would say that since times you need to, it would be useful for you to know for sure if it would. You could make backups (of the applicationhost.config AND your site web.config files), and do it, and see how it goes, knowing you could recover. (A VM snapshot might be still easier, if this were a VM.)

Hope that helps.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

I agree, it is likely there is something buried somewhere that caused CF2016 to mess this up. In an ideal world I'd like to know what is causing it and remove it from the mix but unfortunately I don't have any time to dig any deeper.

Now I'm on CF2016 I am no longer locked into Windows Server 2008 R2, so I intend to do a clean install on Windows Server 2012 in the very near future, so this won't be an issue, not to say it won't niggle me that I didn't have time to find a solution.

The webconfig's for each domain were very small with just settings for compression, nothing else, after the upgrade I see they also did not change. One thing I meant to check was what happened it I removed a webconfig and installed CF2016, maybe then it would consider it to not have any unique settings and not create a setting for that domain (although it still show have added CFM etc into the mix)

I did try to restore a VM snapshot to play a little more, but my automatic updates have since overwritten it, so going back is also not an easy option.

At this point, it looks like it's all I can do

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

FYI I just installed CF2016 developer edition on my Win10 computer and experienced the exact same issue above, removed the entries from the config file, fixed.

I would like to track it down, and I have a clone of my computer that I could use to try

Any suggestions?

Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

Can you elaborate what you mean about “removed the entries from the config file, fixed”? Do you mean IT did, or YOU did?

And when you say you have “a clone to try”, what are you thinking you want to try?

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

It was the same issue I had with the server, CF2016 put those single entries into the applicationhost.config, so I manually removed them, and now it works.

I have a clone of my development computer which had the same issue that could be used to try and get to the root of the problem if you're interested in digging into it, I'm not actually sure where to look for the cause.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

LATEST

OK. And I had asked you in a previous message here to send me the applicationhost.config for the server which had the problem (where when, on CF2016, you found it had only 1 set of handlers, yet when you installed CF2016 or ran the wsconfig tool, and told it to configure IIS for “all sites”, and you found that it suddenly created duplicate sets of handlers for each site).

And I had said to email it, rather than share it here, to email it (Mark has my email address).

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2012 Nov 02, 2012

Copy link to clipboard

Copied

Yep, the external web server connector would indeed refer to the web.xml. It looks at its indications for which file extensions CF should use.

(CF Bar bet: many people think it’s the handler mappings in IIS that control what extensions are passed to CF, but that’s not so. Indeed, those are really more a “vestigial tail” in the body of CF, leftover from the way that things used to be done in IIS 5, before IIS6 added the “wildcard mapping” feature, so that technically now all requests for all extensions are indeed passed to the web server connector, and it checks to see what extensions CF says it wants to handle.)

As for your observation that you need the rewrite rule, ok. But I’m asking: what if you disable all IIS rewrite rules? I just wonder if perhaps some other one you have may be getting in the way here. If you’re saying you’ve done that, and that the ONLY difference between this server and the one where you are not using distributed mode, then I agree it would seem that’s the cause. I just have no experience to say, but I will say that I’ve also not heard that ever reported as a “problem” with distributed mode.

Finally, as for your last point, that is interesting, and yes, as discussed above (which I wrote before I got to the bottom of your note), that would indeed cause CF to try to process all file extensions, which you would not want. But it begs a question: why would adding THAT make things now suddenly work? If the default document is passing in index.cfm, it should be handled by the existing web.xml declaration for *.cfm.

So something definitely seems very odd with your setup. Since I have no experience with distributed mode, I think I will have to bow out as I have nothing more to add. Let’s hope that perhaps Steven Erat (who frequents this forum and does have lots of experience with distributed mode) might chime in eventually for you.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 03, 2012 Nov 03, 2012

Copy link to clipboard

Copied

Charlie Arehart wrote:

Yep, the external web server connector would indeed refer to the web.xml. It looks at its indications for which file extensions CF should use.

(CF Bar bet: many people think it’s the handler mappings in IIS that control what extensions are passed to CF, but that’s not so. Indeed, those are really more a “vestigial tail” in the body of CF, leftover from the way that things used to be done in IIS 5, before IIS6 added the “wildcard mapping” feature, so that technically now all requests for all extensions are indeed passed to the web server connector, and it checks to see what extensions CF says it wants to handle.)

It's interesting that you mention this because I did believe that it was IIS passing the extensions to CF.  I did notice something in IIS however that seems to correlate with what you are saying.  In IIS if you look at the Handler Mappings in the "ordered list" view, the wildcard mapping is indeed listed first.  Above *.cfm and the others.  If that is the case then it seems that would cause ALL requests to be passed to the connector.  Which is what you are saying.  I have also seen this in the web connector's log file.  Very interesting indeed.

Charlie Arehart wrote:

As for your observation that you need the rewrite rule, ok. But I’m asking: what if you disable all IIS rewrite rules? I just wonder if perhaps some other one you have may be getting in the way here. If you’re saying you’ve done that, and that the ONLY difference between this server and the one where you are not using distributed mode, then I agree it would seem that’s the cause. I just have no experience to say, but I will say that I’ve also not heard that ever reported as a “problem” with distributed mode.

I am only running the one rewrite rule, so all of them have been disabled.  The only reason I am using url rewrite is to try and get this working.  And I also agree with you that I have not heard nor have I found anyone else reporting this problem with running in distributed mode.  Although everything I am finding about distributed mode seems to be from years ago.  I have another thought that perhaps Windows 2008's enhanced security settings may be playing a part in this.  I mean that Windows 2008 comes with more security and more things disabled than Windows 2003 did.  Maybe that is playing a role here????

Charlie Arehart wrote:

Finally, as for your last point, that is interesting, and yes, as discussed above (which I wrote before I got to the bottom of your note), that would indeed cause CF to try to process all file extensions, which you would not want. But it begs a question: why would adding THAT make things now suddenly work? If the default document is passing in index.cfm, it should be handled by the existing web.xml declaration for *.cfm.

So something definitely seems very odd with your setup. Since I have no experience with distributed mode, I think I will have to bow out as I have nothing more to add. Let’s hope that perhaps Steven Erat (who frequents this forum and does have lots of experience with distributed mode) might chime in eventually for you.

Well I'm assuming that wildcard mapping that I added made it work because CF now told the connector that it would indeed handle the file.  I mapped the wildcard to the CfmServlet which made it process like a ColdFusion template which made it work.  But it would not work for non-coldfusion file types.

All of this keeps bringing me back to my initial concern (and you mentioned this as well), non of this should be necessary and ColdFusion should work with the default document out of the box.  I'm afraid there is something wrong with my setup.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2012 Nov 03, 2012

Copy link to clipboard

Copied

Yep, good point on a possible implication of Win2k8’s tighter security.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation