Friday, September 11, 2009

Installing ColdFusion on IIS 7 + Configure IIS for ColdFusion in Windows Vista and Windows Server 2008

HTTP_Error_404.3_ColdFusion_on_IIS_7

When installing ColdFusion on Vista or on Windows Server 2008 you may receive HTTP 404.3 Error, similar to this one:

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

Additionally if you run ColdFusion Web Server Configuration Tool, you will see a message saying that IIS components are being installed and could take between 2 to 5 minutes of time.

You can resolve this error by making sure that the two required components of IIS are installed on your system. Namely:

  1. ISAPI Extensions
  2. IIS Metabase and IIS 6 configuration compatibility.


First, start the program called Windows Features. You will find Windows Features under Control Panel –> Programs and Features.

image

When the Windows Features starts, navigate through the features hierarchy under Internet Information Services and select the two features: (a) ISAPI extensions and (b) IIS Metabase and IIS 6 configuration compatibility.

(a)image

(b)Installing_ColdFusion_on_IIS7

ColdFusion is now ready to run from IIS. However, IF you’ve ALREADY installed ColdFusion before following the above steps, continue to follow the steps mentioned under ‘Configuring IIS for ColdFusion’:

Configuring IIS for ColdFusion

If you followed the above steps after having installed ColdFusion 8 or 9, you will have to run Web Server Configuration Tool that comes with ColdFusion to configure IIS7 so that all .CFM files are mapped to be handled by ColdFusion.

The following text is directly from ColdFusion installation guide:

  1. Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 9 > Web Server Configuration Tool.
  2. Click Add.
  3. In the Server pop-up menu, select the host name and the server or cluster name to configure. In the ColdFusion server configuration, the server name is always coldfusion. Clustering support is not available on the server configuration.

    Note: The server or cluster does not have to reside on the web server computer.
    image
  4. In the Web Server Properties area, select IIS and specify the website. For IIS, you typically specify All.
  5. Select the Configure web server for ColdFusion applications option, and click OK.
    image
    Note: Omitting the previous step causes your web server to serve ColdFusion source code.
  6. Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. In addition, copy your application’s CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.

ColdFusion is now ready to serve pages on the Web ;)

Technorati Tags: ,

56 comments:

TJ said...

I'm a bit disappointed. Quite a few of us requested that CF9 use the Native Module capability of IIS7 rather than the ISAPI. The feature request was even marked as completed. Yet CF9 still appears to be using the legacy ISAPI connectors. Aside from the performance gains that this would have offered, it would have also eliminated this confusing and lengthy install process.

Sameer Gupta said...

@TJ, yes it is quite a disappointment. May be we will see that in ColdFusion 10. ;)

Anonymous said...

Thanks so much for this article. I agree, it seems that native integration with IIS7 would be preferred. I ran CF9 in the Multiserver mode as a J2EE app, but prefer the managability of IIS7; mostly for the purposes of running multiple sites on teh same Coldfusion server. So this last step here caused me a few hours of headache.

Brendon Kozlowski said...

By following this, were all of your application mappings properly configured? .cfm, .cfml, .cfc, .cfswf, .cfr, .jsp, and .jws? After installing the required portions to IIS and restarting my Vista Ultimate (x64) machine, and then running the configuration tool, it seems as though ColdFusion is unable to locate any of my websites from IIS. I haven't created/configured any as I was going to use the default root, but I don't think that should make a difference...

Any ideas?

Sameer Gupta said...

Brendon, if you have installed the two components mentioned in the article then just make sure you have downloaded x64 bit edition of CF9 and not running a 32bit edition on a 64bit Vista.

Things you can try:

1. Run ColdFusion Web Configuration with Admin rights i.e. in elevated mode. (Right click Run as Administrator)

2. It is not tricky to add mappings manually. ColdFusion configurator adds one Wildcard Script map and 8 scrip map for: *.jsp, *.jws, *.cfm, *.cfml, *.cfc, *.cfr, *.cfswf, *.hbmxml.

You should add the above "handler mappings" at root node manually.

Wildcard script map extension points to: C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll

All other Script map extensions: C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll

3. Under IIS7 management root node, you will see "ISAPI and CGI Restrictions" icon. Go in there and make sure both the above mentioned dlls are listed and are Allowed and not restricted.

4. If you want to try allowing your IIS7 to run 32bit applications, you can enable it under Application Pools. Right click on an application pool name & go to advanced settings. And set Enable 32-bit applications to true.

Hope this helps!

Aaron M. said...

You are freaking fantastic! A very well-written article that helped me install CF9 Developer onto my Win7 Pro x64 installation.

CF is up and running now thanks to you! You have a great instructional approach to the article, and coupled with the images, this was better than most videos I've seen that teach the same thing!

Sameer Gupta said...

Thanks for your kind words, Aaron.

Anonymous said...

When I run the Add Web Server Configuration tool I get a DoIISListWebSites(OpenKey): ERROR_ACCESS_DENIED and the selections in the wizzard are ghosted. How do I grant access to this ??

Sorry, I'm new to Windows 7

Sameer Gupta said...

If you're getting error that says "ERROR_ACCESS_DENIED", you should try running Web Server Configuration tool in elevated mode - Just right click on its icon and select "Run as Administrator". And I hope you've installed the components I've mentioned in the article.

scott said...

I've resolved the issue. Went into JRun4/bin/wsconfig.exe and set it to run as administrator. after running this file as adminstrator the error went away.

scott said...

Dang Sameer Your fast, I didn't even see your reply. Yeah, that's what I did. Thank you so much your help is much appreciated. Very good step by step with screen grabs. VERY HELPFUL!
Thanks again,

Sameer Gupta said...

@scott, I'm just as fast as you are. :)

charlie arehart said...

Yes, Sameer, as others have said, thanks so much. Was installing CF9 today on a new laptop with Windows 7 and hit the error. Searched and found your entry first, and problem solved. Great job.

Anonymous said...

Great solution, thanks for saving my time!

gareth said...

Hi Sameer,

I've been having problems with connecting IIS:
http://forums.adobe.com/thread/556900?tstart=0

I thought I'd try your instructions for connecting IIS manually, but neither the file jrun_iis6_wildcard.dll or jrun_iis6.dll exists after installing coldfusion.
The only file in wsconfig is jrunwin32.dll

Do you have any suggestions?

Thanks

Sameer Gupta said...

Hi Gareth,

Try to find those dll files. In standard installation, files must be stored at: C:\ColdFusion9\runtime\lib\wsconfig\

Wildcard script map extension points to: C:\ColdFusion9\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll

All other Script map extensions: C:\ColdFusion9\runtime\lib\wsconfig\jrun_iis6.dll

Follow the instructions I gave to Brendon in comments above. If your server is 64bit then you must install 64bit edition of CF.

gareth said...

Hi Sameer,

That's very wierd, I've searched the hard-drive, and those 2 files (jrun_iis6_wildcard.dll and jrun_iis6.dll) aren't there at all!

I had a look at a different CF9 server I installed back in December, and those files are there this time.

I've checked the CF download from Adobe I used for each server:
both are called ColdFusion_9_WWE_win64.exe and come in at 443,876kb, so it's not obvious if they've updated the installer in the last few weeks.

I'll try again using December's installer, and see if that makes a difference.

Thanks

gareth said...

As an update to the last post, I tried the installer I download in December, and it didn't make any difference. Obviously they're the same file.

I have however figured out why those two files aren't there. I noticed the file C:\ColdFusion9\runtime\lib\wsconfig\wsconfig.log which has the following content:

# Created by JRun on 01/20 20:31:33
01/20 20:31:33 info Macromedia JRun 4.0 (Build 108795)
01/20 20:31:33 debug Created file C:\ColdFusion9\runtime\lib\wsconfig\jrunwin32.dll
01/20 20:31:54 error Could not connect to any JRun/ColdFusion servers on host localhost.
Possible causes:
o Server not running
-Start Macromedia JRun4 or ColdFusion 9 server
o Server running
-JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall
on server
-host restriction in security.properties blocking communication with server
jrunx.connectorinstaller.NoServerException: Could not connect to any JRun/ColdFusion servers on host localhost.
Possible causes:
o Server not running
-Start Macromedia JRun4 or ColdFusion 9 server
o Server running
-JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall
on server
-host restriction in security.properties blocking communication with server
at jrunx.connectorinstaller.CIJndi.findServers(CIJndi.java:475)
at jrunx.connectorinstaller.CIJndi.(CIJndi.java:139)
at jrunx.connectorinstaller.CIJndi.(CIJndi.java:145)
at jrunx.connectorinstaller.ConnectorInstaller.parseArgs(ConnectorInstaller.java:228)
at jrunx.connectorinstaller.ConnectorInstaller.(ConnectorInstaller.java:56)
at jrunx.connectorinstaller.ConnectorInstaller.main(ConnectorInstaller.java:760)


I compared it to wsconfig.log on the 'good' server, and whatever process makes this log file, it should copy the other dlls over too.

It looks like I'm back to trying to figure out why the connector can't see coldfusion...

Roman Smolkin said...

Thanks totally helped me get going on my new Win7 box

Anonymous said...

I've got CF9 setup on win server2008 64bit and the Web Server Configuration tool won't let me "Remove". It give me a message that says "error deleting IIS application extensions .jps, jws, .cfm, ,cfml,....ect. from web site. Any ideas on how to update these manually or get this working.

codecurry.com said...

Have you tried removing those extensions manually from IIS?
Read this: http://www.codecurry.com/2010/01/coldfusion-manual-configuration-issues.html

Siva said...

Hi Sam,

I'm new to coldfusion, but found your article in so many sites & was very interesting going through this article. It will really help me if you can provide me with the installation steps for this cold fusion

Jimmy Ortegon said...

Hi Sam: Thank you for writing this awesome article. it helps me a lot. Please be aware that some pictures are not working.. just for the record!! Good job sam!!

Anonymous said...

Excellent content well written. Thank you.

ewahman said...

When I open the web server configuration control panel, configure and click ok, i get an error that says "version 7.0 is installed. supported versions are 4.x, 5.x, 6.x"

my environment is

Windows 2008
running CFML 7

Brad Wood said...

Thanks for the helpful article. I'm setting up Win 2008 and IIS 7 for the first time and everything is so different it's making muy head spin :)

Sly said...

Thanks very helpful! I had the issue with CF9 and IIS7 on vista.

Anonymous said...

Many thanks for this clear and effective tutorial. After following the steps you outline, ColdFusion ran perfectly on Windows 7.

While I applaud that you've provided this tutorial, this is really something that Adobe should have made clear as I honestly would not have expected to have to manually enable the ISAPI aspects nor select IIS 6 console compatibility.

Again, thank you very much!

Phillip said...

Yeah!

Pritesh said...

Thanks.. It works for me..

tkd_kicker said...

Thank you for this post, saved my Friday!

Anonymous said...

Thanks for the post! Worked like charm :)

Aaron Roberson said...

Thank you thank you thank you!!!!!! I had gone through a dozen websites both ASP and ColdFusion related trying to get this issue resolved but only yours had the steps which included adding the configuration through the Web Server Configuration Tool. I took it for granted thinking that this was already configured since I had added IIS as a web server during the CF9 installation process.

Thanks again!

swagat said...

Ben Forta, best-selling ColdFusion author is coming to India this August at India's largest Adobe Flash Platform Conference. Ben Forta will conduct a visionary keynote on the opening day of the summit. For more information and to register log on to adobesummit.com

daniel said...

Thanks Sameer, this has been very helpful indeed. Guys, ensure you run the web server configuration as an administrator, you may encounter permission issues as a result of not doing so. Daniel Godinez

Anonymous said...

Absolutely AWESOME instructions!

Worked perfectly!

Anonymous said...

Thank you! Running it as admin solved the problem of my installation of CF8 on Windows 7x64!! So complicated!

Anonymous said...

THANK YOU for your clear instructions. Been trying to figure this out and other sites were just more confusing. I've used CF6/7 with IIS6 and now have been given CF 9 with IIS 7 on Sever 2008 with short turn-around deadline and it was making me crazy. THANKS AGAIN!!!

Anonymous said...

Thanks for your clear instrucions sameer

Dallas said...

I know this is an old thread...but it just made my life easier :)

Windows 7 64bit, IIS7.5, Coldfusion9(dev ed)

Thanks!

Damian Watson said...

Maybe an old thread, it's still working! Really clear post, thank you. Also worked for my Windows 7 64 Bit as above.

Anonymous said...

All I have to say is, 'Thank you!'

Anonymous said...

If you have not heard it enough before, THANK YOU for posting these instructions. Clear, concise, and correct! There were a couple of things that were different in Step 6 on my system: I did not have a cfdocs directory, and I did not find a cf_root directory either. But the CF pages seem to be serving correctly, so I am a happy camper. Thanks again.

Charlie Arehart said...

As an update to those finding this great resource, please do note that as of CF 9.0.1 (CF 9 Updater 1) you no longer need to enable IIS 6 compatibility. Indeed, 9.0.1 is the first release that formally supports IIS 7, without need of all the monkey business above. :-)

Sameer did go on to right about it in a couple of entries, when it came out months after this one here, so check them out starting at:
http://www.codecurry.com/2010/07/coldfusion-901-update-now-available.html

Note that those who may download CF 9 even after that update comes out will STILL have to apply the update separately. Adobe did NOT recreate the CF 9 installer to incorporate this updater.

So if you're having trouble with IIS on CF 9, please first just try installing the updater. If you did also do some of this stuff above, and then you install the updater, you may want to (or need to) remove some of the IIS 6 compatibility that you enabled. Sameer discusses that in yet another blog entry, linked from the comments of the one I offered above.

Hope that's helpful.

Anonymous said...

I get an error that says "version 7.0 is installed. supported versions are 4.x, 5.x, 6.x"

my environment is

Windows 2008
running CFMX 7

Any help please???

Nathan said...

Hi, Sameer,

I have a static html site and 3 cf sites. I upgraded CF to v9. I followed your instructions on removing ISAPI Extensions and IIS Metabase and IIS 6 configuration compatibility.

But after that not only the static html site didn't work, but also the cf sites became inaccessible. They are all down. Do you have any idea? Any pointer is appreciated.

Nathan Chen

Sameer Gupta said...

Please download and use the CF 9.0.1 installer. Follow the steps at: http://www.codecurry.com/2010/07/installing-coldfusion-901-update.html

Sameer Gupta said...

@Anonymous:

CFMX 7 is not available for 64-bit machines. In all probability your Win 2008 is running 64 bit. So you should configure IIS to run 32 bit applications.

Anonymous said...

Thank you. This worked!!

Anonymous said...

Thanks a lot mate that helped me a lot

Coldfusion 8 (32 bit)
Windows 2008 R2 (64 Bit)

Anonymous said...

Sameer, You are awesome! Thank You, Sir!

Anonymous said...

It was really helpful and to the point.
Thanks Sameer

Anonymous said...

Hi,
Is it a must to put your coldfusion codes in C:\inetpub\wwwroot\cfdocs?
As I am thinking of putting the coldfusion code on another location like d:\mywebsite\ and uses the inetmgr for II7 to map the virtual site to d:\mywebsite\
Thanks.

Anonymous said...

After installing CF on my laptop with no errors, I was concerned when I ran accross this error when I got to the point where I had to open CF Administrator. Luckily, yours was the first page returned in my search for an answer. Thank you. You did a good job. I was able to easily follow your instructions, and got running in no time. Again, thanks.

Steve Parks said...

I am trying to install ColdFusion 7 on Windows 2008 64bit. I have set the Default App Pool to 32 bit applications and run the CF Connector again but it keeps saying that id does not support IIS 7.5.

It appears above that some people have gotten it to work. What tricks do I need to know?

Anonymous said...

Works perfectly .. Thanks a lot

Post a Comment

Be relevant. Spammers will be banned.

☛ Quick Links

♥ Recommended For You