Copy link to clipboard
Copied
Hello,
I've been unable to find a solution to this problem so maybe someone here can point me in the right direction. We're running CF 9.0.1 on Windows Server 2008 with IIS 7. We have three identical production websites each with its own IIS and CF instance. I've linked them using the wsconfig tool but we've noticed some odd behavior. If I stop one of the CF instance services from the server administrative tools, I'm still able to hit the web site. We suspect that maybe even though the wsconfig tool says that each instance is linked to a different site, perhaps all the sites are somehow sharing the same JRun server? Has anyone experienced anything like this, or can anyone recommend something to try? I greatly appreciate any insight. Thanks!
Copy link to clipboard
Copied
Upon more investigation, each site's handler mapping is pointing to the same \lib\wsconfig\#\jrun_iis6_wildcard.dll and manually changing this number gets overwritten as soon as the service is restarted. Is there somewhere I can hardcode this in?
Copy link to clipboard
Copied
You could identify the instance with this code:
(Someone might also propose running the CF Admin to see what it would report, but the default in multiserver mode is to access the Admin via the built-in web server, not IIS, so unless you take extra steps to enable that, you may not be able to access the Admin via IIS against each site separately. You could call the Admin API to get various information as it would be reported in the Admin, but the above is an "old school" pre-Admin API way of getting the info.)
/charlie
Copy link to clipboard
Copied
I'm still able to access the admin and the admin for each site. For some reason it always assigns the CF Administrator site a different # so that seems to be intact.
Copy link to clipboard
Copied
But are you accessing the Admin using the built-in web server? That would be very different and not related to IIS.
And what do you mean "assigns it a different number"? Are you referring here to the port for the Admin, such as 8301, 8302, or the number within the IIS wildcard mapping you referred to previously? And if the latter, what you do mean "always assigns a different number"? I thought you were saying before that it reverts back to some one number despite your changing it. Do you now mean that it really changes somehow to a new number (on a CF restart)? That would be very odd.
You also didn't answer if it's a restart of CF that you were referring to in the first note.
Just trying to help. Please don't take any offense in my pressing these points.
/charlie
Copy link to clipboard
Copied
No offense taken. No, I'm accessing the CF Admin through the IIS site I configured for it. As far as the different number, I'm referring to the IIS handler mapping wildcard. I have four sites; CF Admin and three sites (01, 02, and 03). CF Admin always gets a distinct wildcard mapping (we'll say 1 for the sake of argument). 01 gets assigned the #2, and 02 and 03 also get defaulted to #2 as well. Running wsconfig from the command line shows that 4 directories are created, yet IIS still lists the three sites as having the same mapping.
I just noticed that it's not that my changes are being overwritten after an IIS restart; when I update the handler mapping path on one site the other three get changed automatically. Maybe something in my applicationhost.config?
Copy link to clipboard
Copied
But wait, you're saying here that you have "one CFADmin site". I was referring to accessing the CFAdmin for each instance. What instance does that one CFAdmin site go to? And how do you access then the CFAdmin's for each instance?
As for sites 2 and 3 getting "defaulted to #2", I will assert again that you need to remove the config for sites 2 and 3 and create them again. For some reason, though the dirs exist (you say, for 2 and 3), they are not being pointed to by IIS. Correction of that within the web server config tool should fix that.
As for a change to one handler mapping causing a change in the others, that doesn’t really make sense at all. Each site (within IIS) is distinct from the other.
I'm not aware of there being any connection of all this to applicationhost.config. (Not that there may not be one: I just don't know of it.)
/charlie
Copy link to clipboard
Copied
CF Administrator's IIS site is linked to the cfusion JRun server. To access each instance, I login to the main CF administration page and go through the instance manager. I've tried removing/readding the configuration with wsconfig but it always comes out the same.
I agree, redoing the config with the wsconfig should fix it. In fact, running from the command line with verbose output does show that it's doing what it is supposed to; creating a separate wildcard mapping for each web site.
Since we have a large number of virtual directories, we created the other two sites by manually editing the applicationhost.config file and copying the configuration from the first site and changing names. I've gone through and made sure each site had a unique identifier but I'm assuming there's something I'm missing.
Changing one handler mapping and seeing it reflected across 3 separate sites definitely doesn't make any sense, which is why I'm perplexed as to what I am missing here.
Copy link to clipboard
Copied
So to be clear, if you are accessing the Admin using the Instance Manager, then you will notice when the pages open (in the Admin for the other instances) that they use a port, like 8301. That's the internal web server, and therefore you ARE NOT using IIS to access the CF Admin for anything but your cfusion instance. I only pressed that because if you WERE saying you were accessing the Admin for each instance via IIS, then it would have been very odd if you didn't experience the same in connecting to your app via IIS.
As for your saying that "we created the other two sites by manually editing the applicationhost.config file and copying the configuration from the first site and changing names", wow that's indeed important information. There's more that the web server config tool does than just to the config IIS for the site. It also creates the needed files in the CF installation, so you can't "just modify" the IIS side of things.
You say also that you have "tried removing/readding the configuration with wsconfig". Was that separate from your manual steps above? I would recommend that you do that, and not do any monkeying around with things in the IIS config, and make sure it works (without regard to worrying about replicating your needed virtual directories). If it does, THEN you can do whatever you want on the IIS side.
(And I'm also still not convinced that the changes to applicationhost.config are what you need. I've never seen mention of that, though I realize IIS 7 is quite different. I did what editing I needed to do to get things workingwhen I needed to do them manually in IISby modifying the interface. Are you positive100%that that file (and only that file) is what gets modified corresponding to changes in the IIS interface. If you're not 100% sure, then you may be doing only half the job, which could explain why things aren't quite working for you.)
Whenever you set out to do things manually, to save time, you run the risk of things not working as expected. And with IIS 7 support for CF being so new, you're running at even greater peril for there being fewer people available to help share experience with applying the same tricks--and avoiding important traps.
/charlie
Copy link to clipboard
Copied
Here's what we did to solve this and hopefully it will help someone else down the line:
We were using the same physical path for all three websites and trying to run separate CF instances for each one. Because of this, there is only one root web.config file and everytime a new JRun connector was created using the wsconfig tool, it updated this one file changing the mappings across all three sites. You need to delete that line from the web.config file and move it into the applicationhost.config file with a location tag and overrideMode set to allow:
<location path="myWebSite1" overrideMode="Allow">
<system.webServer>
<handlers>
<clear />
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" />
<add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" />
<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
<add name="JWildCardHandler" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\ColdFusion9\lib\wsconfig\2\jrun_iis6_wildcard.dll" resourceType="Unspecified" requireAccess="None" />
</handlers>
</system.webServer>
</location>
Copy link to clipboard
Copied
I'm trying to do the same thing (mutilple IIS websites pointing to the same server directory running on separate instances of CF). Using the ApplicationHost.config option sounds like it is exactly what I need. However, when I try, I either end up killing IIS altogether or it just does nothing at all. I took your code snippet and modified it for my own settings. Basically, I went into the webroot, opened up the web.config file (run as administrator) and commented out the Handlers section of the page. When I test other websites/instances everything still works (perfect). I try to browse to .cfm pages on the instacne I just commented out and I get an error (again as execpted...perfect). I then open up the ApplicationHost.config file and paste the following code into it:
<location path="[i assume this is the IIS website name?]" overrideMode="Allow">
<system.webServer>
<handlers>
<add name="JWildCardHandler" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\3\jrun_iis6_wildcard.dll" resourceType="Unspecified" requireAccess="None" />
<add name="hbmxmlHandler" path="*.hbmxml" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfswfHandler" path="*.cfswf" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfrHandler" path="*.cfr" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfcHandler" path="*.cfc" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfmlHandler" path="*.cfml" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="cfmHandler" path="*.cfm" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="jwsHandler" path="*.jws" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
<add name="jspHandler" path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="C:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
</handlers>
</system.webServer>
</location>
Now, the first question is, what do I put in the name of the of the Location tag? Is that the IIS website name? Second, depending on where in the file I place that code block I get different results. If I place it as a child of the Configuration tag nothing happens at all. It doesn't break, but my .cfm pages still don't come up so... No change. I tried placing it deeper in the file (like nesting it inside the Configsections and it breaks all of IIS so I removed that real quick).
Can you give a more detailed example of where to place it and what to add to the "name" attribute?
Thanks,
Copy link to clipboard
Copied
@Dawg, you're taking severe risks by trying to monkey with those config files that way.
Why are you not just using the "web server configuration tool" that comes with CF?
And when you say you want "mutilple IIS websites pointing to the same server directory running on separate instances of CF", by "same server directory" are you referring to the location of your CFML (which would be set as the IIS docroot for the site) or the location of these CF/jrun dlls? If the latter, why again are you messing with the files? You could do that by telling the web server config tool to map multiple sites to a given CF instance.
Sorry if perhaps there is some context from past messages I'm not thinking of, but I suspect you may find few people willing to help you piece apart those config files. It's just too risk changing thing, plus, there are aspects of the config of ini and properties files within CF that get created/modified by that "web server config too", so there's a real chance you'll make a mistake in your edits.
Just some thoughts. Others may feel differently.
/charlie
Copy link to clipboard
Copied
Well that stinks: I just viewed this message from earlier as it appears within the forum, and I see that the code fragment I offered was dropped somehow. I had replied via email. I had not ever noticed that these forums did not allow HTML/CFML in messages sent by email.
The code I had offered (without the opening/closing brackets) was this:
cfoutput
Instance name: #createObject("java", "jrunx.kernel.JRun").getServerName()#
/cfoutput
----------------------------------------------
Here's the message from earlier in this thread that I'm referring to. I had said:
You could identify the instance with this code:
(Someone might also propose running the CF Admin to see what it would report, but the default in multiserver mode is to access the Admin via the built-in web server, not IIS, so unless you take extra steps to enable that, you may not be able to access the Admin via IIS against each site separately. You could call the Admin API to get various information as it would be reported in the Admin, but the above is an "old school" pre-Admin API way of getting the info.)
/charlie
Find more inspiration, events, and resources on the new Adobe Community
Explore Now