Friday, December 17, 2010

FIX IT: ASP.NET 4.0 registration problem after enabling WCF activation feature in IIS 7

If you recently enable WCF HTTP Activation Feature in IIS 7, you might face this prolem when you try to navigate to your WCF service that is targeting .Net Framework 4.0:

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

To fix it:
1) Open VS Command Prompt.
2) Type the following command to re-install ASP.NET 4.0 and register the right .NET Framework.
aspnet_regiis.exe -iru
3) Refresh your WCF host url, it works :)

Hope this helps.
Mostafa Arafa

FIX IT: HTTP 404 Not Found problem when deploying WCF in IIS 7.0

Hi Folks,

I was developing a WCF syndication service to be deployed on Windows Azure, I faced a problem that when you deploy the WCF service in IIS 7.0 it doesn't work and gives the following error in the browser: HTTP 404 Not Found. I checked the deployed service it contains the dlls and configuration files. After few minutes i figured out that the problem is in one of IIS features is not enabled which is the WCF activation feature.

To fix this problem:

1) Open control panel.

2) Select programs.

3) Select Turn on/Off windows Features.

4) Look for Microsoft .Net Framework 3.5.1

5) Check WCF HTTP Activation and Non Activation check boxes (BOTH).

6) Click ok.

7) Now your IIS is configured to host WCF services with HTTP activation and non HTTP Activation requests.
Hope this helps.
Happy New Year :)

Mostafa Arafa