首页 新闻 赞助 找找看

Asp.net下发布Webservice报错Could not create type

0
悬赏园豆:50 [待解决问题]


win7 IIS 7.5     vs2010     asp.net4.0下

发布Webservice时,我在VS2010里发布网站的路径是D:\Project\WebServices\PrecompiledWeb\QueryWebSite,在实际IIS中配置网站是,我设置的物理路径是D:\Project\WebServices\PrecompiledWeb,结果QueryWebSite下的资源都不能访问了,其中在访问Service.asmx是报错如下:

Server Error in '/' 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: Could not
create type 'Service'.

Source Error:





Line 1:  <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" class="Service" %>


Source File:
/QueryWebSite/Service.asmx    Line: 1




Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.225

good jhon的主页 good jhon | 初学一级 | 园豆:150
提问于:2011-08-07 10:38
< >
分享
所有回答(1)
0

你这个不是Project类型的项目,估计需要把代码一起拷贝到IIS上,建立一个可以编译的WEB项目最方便

2012 | 园豆:21228 (高人七级) | 2011-08-07 17:07
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册