error adding service reference in web part

Discussion in 'ASP .Net' started by cindy, Aug 14, 2009.

  1. cindy

    cindy Guest

    I create a 2008 asp.net server control project
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Microsoft.SharePoint.WebPartPages;


    namespace mySearchBox
    {
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:mySearchBox runat=server></{0}:mySearchBox>")]
    public class mySearchBox : WebPart
    {
    [Bindable(true)]
    [Category("Appearance")]
    [DefaultValue("")]
    [Localizable(true)]


    }
    }

    I add a service reference to http://yourserver/_vti_bin/search.asmx
    Give it namespace of “QueryService†and you can see it in the object browser
    //Get an instance of the search web service there is no intellisense
    mySearchBox.QueryService service = new QueryService();

    do a build error in Reference.cs
    The type name 'QueryService' does not exist in the type
    'mySearchBox.mySearchBox' c:\projects\mysearchbox\mysearchbox\service
    references\queryservice\reference.cs 167 60 mySearchBox

    Error in Reference.cs

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel",
    "3.0.0.0")]
    public interface QueryServiceSoapChannel :
    mySearchBox.QueryService.QueryServiceSoap, System.ServiceModel.IClientChannel
    {
    }




    --
    cindy
     
    cindy, Aug 14, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kiran
    Replies:
    3
    Views:
    765
  2. wawa_piggy

    Adding a web reference to a java web service

    wawa_piggy, Apr 19, 2004, in forum: ASP .Net Web Services
    Replies:
    5
    Views:
    178
    Dino Chiesa [Microsoft]
    Apr 22, 2004
  3. CyberLotus

    Adding web reference to a windows service

    CyberLotus, Dec 10, 2004, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    253
    Dan Rogers
    Dec 13, 2004
  4. only_me

    vs2005 consuming web service, adding web reference ?

    only_me, Sep 20, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    212
    only_me
    Sep 25, 2005
  5. Trouble adding web service reference

    , Apr 26, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    141
Loading...

Share This Page