On Windows 2003 Server, after installing IIS and WinFX, you may get this error when you navigate a .svc file from the browser. This is normally because the ASP.NET ISAPI filter is not enabled by default. There are two ways to enable it:
Approach 1: Rerun the command “aspnet_regiis.exe -i –enable” from a command window. This will reinstall ASP.NET and enable the ISAPI filter.
Approach 2: Using IIS UI Console, (1) Open IIS Manager. (2) Expand your machine node. (3) Click on "Web Service Extensions". (4) Find "ASP.NET v2.0.xxxxx". The current state would be "Prohibited". Click on "Allow" will resolve the issue.
You may get the following error message when you navigate a WCF service (.svc file) from a browser:
The CLR Type 'XXXX' could not be loaded during service compilation. Verify that this type is either defined in a source file located in the application's \App_Code directory, contained in a compiled assembly located in the application's \bin directory, or present in an assembly installed in the Global Assembly Cache. Note that the type name is case-sensitive and that the directories such as \App_Code and \bin must be located in the application's root directory and cannot be nested in subdirectories.
The error message is pretty explainable by itself. However, I still want to point out different situations when this can happen. Here is the format of the Service Directive of a .svc file:
<%@Service language=c# Class="<Managed Type>" [Other attributes] %>
Here are possible reasons why this can happen: