Asp.net Webservice无法添加

Asp.net Webservice无法添加,asp.net,visual-studio-2010,web-services,Asp.net,Visual Studio 2010,Web Services,我的项目中有一个Web服务。每当我尝试添加服务引用时,它都会显示一个特定的错误 Could not create type 'json_read.GetMapLocation'. 源错误 Line 1: <%@ WebService Language="C#" CodeBehind="GetMapLocation.asmx.cs" Class="json_read.GetMapLocation" %> 第1行: 这是我的网络服务 <%@ WebService Langu

我的项目中有一个Web服务。每当我尝试添加服务引用时,它都会显示一个特定的错误

Could not create type 'json_read.GetMapLocation'.
源错误

Line 1:  <%@ WebService Language="C#" CodeBehind="GetMapLocation.asmx.cs" Class="json_read.GetMapLocation" %>
第1行:
这是我的网络服务

<%@ WebService Language="C#" CodeBehind="GetMapLocation.asmx.cs" Class="json_read.GetMapLocation" %>

代码隐藏

namespace json_read
{
    /// <summary>
    /// Summary description for GetMapLocation
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [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 GetMapLocation : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
名称空间json\u读取
{
/// 
///GetMapLocation的摘要说明
/// 
[WebService(命名空间=”http://tempuri.org/")]
[WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
//要允许使用ASP.NET AJAX从脚本调用此Web服务,请取消注释以下行。
//[System.Web.Script.Services.ScriptService]
公共类GetMapLocation:System.Web.Services.WebService
{
[网络方法]
公共字符串HelloWorld()
{
返回“你好世界”;
}

我为这个错误挣扎了几天,但还没有解决。谢谢您的帮助。

检查这个问题的答案,也许它可以帮助您,先生。我已经检查过了,问题仍然存在。