Main Page | Report this Page
.NET DotNet Forum Index  »  .NET Framework Forum  »  error service reference in web part server control...
Page 1 of 1    

error service reference in web part server control...

Author Message
cindy...
Posted: Thu Aug 13, 2009 6:19 pm
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
 
Vicky...
Posted: Mon Sep 21, 2009 6:22 am
Guest
Have anyone found a solution to this problem?
I keep getting the object reference not set error when I try to
instantiate the QueryService class.
I am using the search.asmx web service. The intellisense does not show
this class.
Anyone help please!!!
-Vikram

On Aug 13, 6:19pm, cindy <cme... at (no spam) nospam.nospam> wrote:
Quote:
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 tohttp://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
 
Chris Givens...
Posted: Mon Oct 05, 2009 8:27 pm
Guest
I'm guessing you might have added it as a WCF service reference rather than
a web service reference. There is quite a difference in the two.

Hope this helps,
Chris

"Vicky" <vikramaditya.s at (no spam) gmail.com> wrote in message
news:130807dd-7176-43fa-8851-ea728162c5ec at (no spam) e4g2000prn.googlegroups.com...
Quote:
Have anyone found a solution to this problem?
I keep getting the object reference not set error when I try to
instantiate the QueryService class.
I am using the search.asmx web service. The intellisense does not show
this class.
Anyone help please!!!
-Vikram

On Aug 13, 6:19 pm, cindy <cme... at (no spam) nospam.nospam> wrote:
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 tohttp://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
 
...
Posted: Sat Oct 24, 2009 2:09 pm
Guest
kusura bakmayin arkadaslar dilinizi bilmiyorum trke bilen varsa onunla
konusabiliri m bye

"Vicky" <vikramaditya.s at (no spam) gmail.com>, iletide sunu yazdi
news:130807dd-7176-43fa-8851-ea728162c5ec at (no spam) e4g2000prn.googlegroups.com...
Quote:
Have anyone found a solution to this problem?
I keep getting the object reference not set error when I try to
instantiate the QueryService class.
I am using the search.asmx web service. The intellisense does not show
this class.
Anyone help please!!!
-Vikram

On Aug 13, 6:19 pm, cindy <cme... at (no spam) nospam.nospam> wrote:
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 tohttp://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
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Nov 22, 2009 3:03 pm