all groups > asp.net webservices > september 2007 >
You're in the

asp.net webservices

group:

How to Webservice returning String() in VB.NET


Re: How to Webservice returning String() in VB.NET adh
9/24/2007 1:21:58 PM
asp.net webservices:
VB.NET does not return the string array like C# does.
Testing the webservice goes to the Not Found Page, while in C# you get
the Array-XML

Thanks, adh

Re: How to Webservice returning String() in VB.NET adh
9/24/2007 1:26:14 PM
See MS Controls Toolkit: AutoCoplete which ask for a string() result.
Works fine in C# but not with a VB <webmethod>
I prefer it in VB because I need to Cash the (big) answer base.
Thanks, adh

Re: How to Webservice returning String() in VB.NET adh
9/24/2007 1:43:05 PM
Nothing Wrong (!) and it doesn't throw an exeption, just does not get
the result and goes to the web not found.

I have seen more posts about it. Like using the line:
<System.Web.Script.Services.ScriptService()> _
which (at least in VB2005) is not recognized (ScriptService
is in System.Web.Script.Services)
Thanks, adh

Re: How to Webservice returning String() in VB.NET John Saunders [MVP]
9/24/2007 2:10:37 PM
[quoted text, click to view]

In what way does it not work?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Re: How to Webservice returning String() in VB.NET adh
9/24/2007 2:24:09 PM
You Tried?
ScriptService is not included in definition of
System.Web.Script.Services
Not in VB.NET2005
Thanks, adh

Re: How to Webservice returning String() in VB.NET John Saunders [MVP]
9/24/2007 4:35:00 PM
[quoted text, click to view]

VB.NET and C# have identical capabilities here. You must have done something
wrong in the VB code that you did correctly in C#.

Does the VB code return nothing? Does it throw an exception?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Re: How to Webservice returning String() in VB.NET John Saunders [MVP]
9/24/2007 5:08:36 PM
[quoted text, click to view]

There is no issue of "recognition". Import the namespace and try it again.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
How to Webservice returning String() in VB.NET adh
9/24/2007 5:33:39 PM
Possible in C# but not in VB.NET 2005 ????

<WebMethod()> _
Public Function GetCompletionNames(ByVal prefixText As String, ByVal count
As Integer) As String()
Dim st as String()
......
return st

Doesn't work !!???

Thanks

Re: How to Webservice returning String() in VB.NET John Saunders [MVP]
9/24/2007 6:06:40 PM
[quoted text, click to view]

Namespaces have nothing to do with languages. If the namespace is absent in
VB.NET 2005, then it's absent in .NET.

More likely, you aren't aware of how, in VB, to add a reference to the
assembly containing the System.Web.Script.Services namespace. Look in your
C# project and find out what reference you had to add, then add that
reference to the VB project.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Re: How to Webservice returning String() in VB.NET adh
9/24/2007 10:28:02 PM
Done all the same (I still know to copy....;-)
Please try a WebService yourself and see.

Thanks, adh

Re: How to Webservice returning String() in VB.NET John Saunders [MVP]
9/25/2007 12:14:54 PM
[quoted text, click to view]

Believe what you like. VB.NET doesn't cause namespaces to be inaccessible,
and that namespace is not part of VB.NET.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
AddThis Social Bookmark Button