WCF – IIS is not getting .net 3.0


Deployment of a WCF Service in the IIS is giving the following error:

Server Error in '/calc' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The unrecognized directive 'Service' is specified.

Source Error:

Line 7:  
Line 8:  
Line 9:  <%@ Service Class="Calculator.CalculatorService" %>
Line 10: <%@ Assembly Name="CalculatorService" %>

Source File: /calc/Service.svc    Line: 9

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

I have studied these suggestions. But it didn't work.

What can be the problem?

Best Solution

Is it possible that you are missing the ServiceHost to begin the directive for the service..


<%@ ServiceHost Service="Calculator.CalculatorService" %>

P.S. .NET 3.0 & 3.5 are assembly releases on top of the 2.0 Runtime, the framework won't say version 3.0/3.5