2009-09-23 53 views
0

部署是给下面的错误:WCF - IIS没有得到.NET WCF服务在IIS 3.0

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 

我研究these建议。但它没有奏效。

可能是什么问题?

+0

向我们显示* .svc文件的内容! – 2009-09-23 16:23:11

回答

3

难道你缺少的ServiceHost开始该服务的指令..

IE:

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

附: .NET 3.0 & 3.5是在2.0运行时顶部的程序集版本,框架不会说版本3.0/3.5