I was pulling my hair out trying to resolve this issue. I uninstalled WCF from the .NET Framework 3 and tried to install .NET Framework 4’s WCF using ServiceModelReg.exe.
We all know this fun error: [Warning]A previous version of Windows Communication Foundation was detected.
And this one, too: [Warning]The HTTP namespace reservation already exists.
So, there are a lot of tutorials for how to fix this in IIS7 using netsh http. But what about those of us not running Windows Server 2008? Those of us running Windows Server 2003 need some love, too!
So, here’s what I did to solve it.
1. I uninstalled WCF from v3.x\Windows Communication Foundation\ServiceModelReg.exe –ua
2. I installed the httpcfg utility (which you can download from me here, since it’s not easily found anywhere on Microsoft’s site) to remove the namespace reservation that for some reason doesn’t get deleted after uninstalling WCF
3. Open up the command line and type the following:
httpcfg.exe query urlacl
You’ll probably see something like the following:
What’s causing all the problems is that last item. Why this isn’t easier to delete in Server 2003 I have no idea, but who cares… here’s what you do:
4. Delete the *.80 reservation by typing the following command:
httpcfg.exe delete urlacl -u ANNOYINGURL
…where ANNOYINGURL is the entry after URL : in the screen shot above. So, in my case it would be:
httpcfg.exe delete urlacl -u http://+:80/Temporary_Listen_Addresses/
5. Now, you should see something similar to the following after running this command:
HttpDeleteServiceConfiguration completed with 0.
That means the reservation has been deleted. Excellent!
6. Query the metabase again and you’ll see the reservation is gone. Your screen will look something like the following:
7. Restart IIS for good measure. If you don’t know how to do this, simply type the following command:
The results of running this command will look similar to the following:
8. Now try reinstalling WCF and you should be good to go!
Update (10-Jun-2010): Is your Web service or Web site not working after installing .NET Framework 4.0 on Windows Server 2003 + IIS6? Make sure you ENABLE the framework, as shown in the figure below:
Additional Information From a Reader:
I was passed this information from Andreas Warberg… you may also find it helpful :)
I hoped to be able to comment directly on the article or send you a private message but it seems this has been disabled ;-)
So below is my feedback:
I found your article and it helped me to upgrade from WCF 3.0 to 4.0 on IIS6. Thank you very much!
I noticed the link to httpcfg.exe was broken so I wanted to send you this link to Windows Server 2003 support tools http://www.microsoft.com/downloads/details.aspx?FamilyID=96a35011-fd83-419d-939b-9a772ea2df90&displaylang=en from where you can download and install support.cab and suptools.msi.
Installing this will give you a copy of httpcfg.exe and I suggest you add it to your otherwise great article.
I am using WCF (.svc) and a thing I experienced was that no application extension was automatically registered for svc-files. I had to do this manually by going to Default Web Site (insert correct Web Site Name here) Properties > Home Directory > Configuration. Here I added a new Application Extension Mapping for Extension = svc and Executable = c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll.
Maybe this could make it into the article for the benefit of us who are still using Windows Server 2003… :-)
TIP: If you’re running IIS7 on Vista or Windows Server 2008, the process is MUCH easier. Simply open a command line and enter the following:
netsh http delete urlacl "http://+:80/Temporary_Listen_Addresses/"