C# Web服务错误无法创建类型“LookUp.LookUpService”

C# Web服务错误无法创建类型“LookUp.LookUpService”,c#,web-services,iis-7,C#,Web Services,Iis 7,我正在尝试托管一个web服务,我可以很好地将其部署到服务器上,但当我尝试运行它时,我无法创建类型“LookUp.LookUpService” 我已经在网上搜寻解决方案,据我所知,这不是名称空间问题。它在调试时运行良好,但当我在将其作为Web服务添加到iis后尝试访问它时,它会抛出此错误 这是我的密码 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.W

我正在尝试托管一个web服务,我可以很好地将其部署到服务器上,但当我尝试运行它时,我无法创建类型“LookUp.LookUpService”

我已经在网上搜寻解决方案,据我所知,这不是名称空间问题。它在调试时运行良好,但当我在将其作为Web服务添加到iis后尝试访问它时,它会抛出此错误

这是我的密码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace LookUp
{
    /// <summary>
    /// Summary description for LookUpService
    /// </summary>
    [WebService(Namespace = "http://tempuri.com/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    //[System.Web.Script.Services.ScriptService]
    public class LookUpService : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
    }
}
这是我得到的错误

Server Error in '/LookUp' 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 'LookUp.LookUpService'.

Source Error:



Line 1:  <%@ WebService Language="C#" CodeBehind="LookUpService.asmx.cs" Class="LookUp.LookUpService" %>



 Source File:  /LookUp/LookUpService.asmx    Line:  1
谁能给我一些建议,看看我可能做错了什么

问候 卡尔