Last year I made a mistake of installing CTP on my DEV box and learnt the lesson ("Never install CTP versions on the machine, always use Virtual machine") hard way.
I installed .NET framework 3.0 CTP and WCF, WPF, WF extensions for Visual Studio 2005, I worked on a SOA project where we used WCF as web service provider, we hosted WCF service in Windows Service and all worked great, project deployed, I moved on.
Recently I tried to write a WCF service for one of my current project, and this time I wanted to host it in IIS, it did not work, my initial reaction was I forgot the concepts of WCF and my code has a mistake, so I read few WCF tutorials, redid the service, it failed again. Then I followed MSDN introduction to WCF link step by step, luckily one of the example I followed hosted the service in Web Development Server (previously Cassinni server) and the sample worked, I moved the same sample to IIS and it failed. So my initial trouble shooting was over, I knew my framework 3.0 is corrupt and need to be repaired, I searched online found many articles hinting at re-registering *.svc as an extension etc., nothing worked. So I came to conclusion of uninstalling 3.0 and reinstall it. And my troubles started here.
I uninstalled Framework 3.0, Framework 3.5 from my box, and tried to re-install both. Uninstall went fine, but re-install failed, I tried several times, digged into the logs to learn more about the failure but nothing was helpful. I googled, found nothing specific, so I started removing .NET altogether from my box, removed 2.0, remove 1.1, remove 1.0 and re-installed all, each time I got stuck at Installing Framework 3.0. In the Framework 3.0 installation log, I found some strange error DepCheck: WCF is not found blah blah, but I am installing Framework 3.0 for same WCF, how can it find WCF there.
After hours of agonizing install re-install uninstall google sequences, I stumbled on few blogs which mentioned about few Registry keys WCF CTP sets up which don't get deleted while uninstall, and have to remove them manually, I found another interesting blog post about a Tool to Clean up .NET Framework
http://blogs.msdn.com/astebner/archive/2005/04/08/406671.aspx
I downloaded the tool and ran it, it did cleaned up the registry keys, but still no luck with the installation.
I was back reading the installation logs, and this time I found out that the Framework 3.0 exe actually extracts itself to C:\Documents and Settings\$User$\Local Settings\Temp\dotnetfx304506.30\1033\ (infact all framework exe's does this) and run the msi's from there, actuall Framework 3.0 exe seems to have only 3 files, in 3 folders, wcf/wcf.msi, wpf/wpf.msi, wf/wf.msi, now I got the idea, since the DepCheck: from above is complaining about WCF not found, I thought I will install WCF from this extracted folder first separately, then try 3.0 installation.
Hurray!!!! I found the actual problem this time, when I ran wcf.msi, it complained and this time the complaint was much more understandable. WCF msi was complaining about write permissions to one of the registry keys (Check Below)
MY Computer\HKLM\System\CurrentControlSet\Services\EventLog\Security\ServiceModel 3.0.0.0
I gave permissions, and re-ran Framework 3.0 exe and Yes, this time it worked :), this left me thinking, if wcf.msi is actually part of the parent Framework 3.0 exe why did not the parent exe gave me the exact similar message, was the child not propagating its problems to the parent.
During this whole Ordeal I found the reason for my initial actual problem, "Not able to host WCF Service in IIS", I found my reason in Microsoft .NET Framework 3.0 release notes, and the reason is CTP had this problem.
http://msdn.microsoft.com/en-us/windowsvista/bb188202.aspx
Reason from above link :
2.7.4 May not be able to web host WCF services if a pre-RC1 version of WCF was previously installed
If you installed a previous version of the .NET Framework 3.0 while IIS was installed, when you upgrade to the RTM version of the .NET Framework 3.0 you may have difficulty accessing WCF services that are IIS hosted using .svc files. On computers running Windows Server 2003, accessing an .svc extension from the browser may return a "404: Page Not Found" error. On computers running Windows XP, the .svc content may be displayed as plain text.
This is due to an issue with WCF script map registrations in a previous release.
To resolve this issue
There are three ways to work around this issue:
- Download the unsupported tool, CleanIISScriptMaps.exe from http://wcf.netfx3.com/files/folders/product_team/entry5648.aspx. Run the tool from a command console without any arguments.
- Uninstall and reinstall IIS or re-create your Web sites:
- Uninstall IIS and reinstall it so that the IIS Metabase is refreshed. Then run the WCF install tool manually to re-register the WCF scriptmaps:
"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" /r /y - If you are running Windows 2003 Server, you may be able to resolve the problem by deleting the "Default Web Site" and re-creating it.
- Install .svc manually as a temporary workaround:
You can run the following command to install .svc mapping manually. However, this refreshes the IIS Metabase for existing sites. "%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" /s:W3SVC
This solution I found may not work exactly for the problems you are facing with your installation, but!!!! HEY, if did, I will be happy with the effort I put into writing this post :)
--Kiran Bheemarti