Webservice无法添加

时间:2013-03-25 10:16:27

标签: 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" %>

这是我的网络服务

<%@ 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";
        }

我正在努力解决这个错误几天但没有灵魂。谢谢你的帮助。

0 个答案:

没有答案