2009-09-23 80 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