Click here to Skip to main content
15,920,217 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Accessing a variable on another form Pin
Paul Conrad30-Jul-07 11:13
professionalPaul Conrad30-Jul-07 11:13 
AnswerRe: Accessing a variable on another form Pin
Christian Graus30-Jul-07 11:02
protectorChristian Graus30-Jul-07 11:02 
QuestionProblem while running a vb.net application in Network Pin
vut230-Jul-07 7:01
vut230-Jul-07 7:01 
AnswerRe: Problem while running a vb.net application in Network Pin
Dave Kreskowiak30-Jul-07 8:49
mveDave Kreskowiak30-Jul-07 8:49 
Questionplz help about the ruler Pin
eyes200730-Jul-07 5:40
eyes200730-Jul-07 5:40 
Questionkeydown event doesn't get triggerd Pin
Tom Deketelaere30-Jul-07 5:03
professionalTom Deketelaere30-Jul-07 5:03 
QuestionListView and ContextMenu Pin
Sebastian T Xavier30-Jul-07 4:27
Sebastian T Xavier30-Jul-07 4:27 
QuestionWebservice written in VB.NET Pin
microdommi30-Jul-07 4:04
microdommi30-Jul-07 4:04 
Hi there,

I've just wrote my first webservice with VB.NET. If I want to get back strings or integers as return values everything works fine, but when I try to get an array back, there is something wrong. Maybe you can take a look at the code:

Public Class DirectoryInformation<br />
        Public Name As String<br />
    End Class<br />
    <WebMethod()> _<br />
    Public Function fncGetAllFilebin(ByVal VirtualPath As String)<br />
        Dim di As New DirectoryInfo(WebServerPath & VirtualPath)<br />
        Dim diArr As DirectoryInfo() = di.GetDirectories<br />
        Dim dri As DirectoryInfo<br />
        Dim x As Integer = 0<br />
        Dim Arr As DirectoryInformation()<br />
        ReDim Preserve Arr(di.GetDirectories.Length - 1)<br />
        For Each dri In diArr<br />
            Arr(x) = New DirectoryInformation()<br />
            Arr(x).Name = dri.Name<br />
            x += 1<br />
        Next<br />
        Return Arr<br />
    End Function


The error i get is:

"System.Web.Services.Protocols.SoapException" ist in System.Web.Services.dll

System.Web.Services.Protocols.SoapException: Die Anforderung konnte vom Server nicht verarbeitet werden. ---> System.InvalidOperationException: Beim Generieren des XML-Dokuments ist ein Fehler aufgetreten. ---> System.InvalidOperationException: Der Typ whsEasyDoc.Service1+DirectoryInformation[] kann in diesem Kontext nicht verwendet werden.
bei System.Xml.Serialization.XmlSerializationWriter.WriteTypedPrimitive(String name, String ns, Object o, Boolean xsiType)
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write1_Object(String n, String ns, Object o, Boolean isNullable, Boolean needType)
bei Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write8_fncGetAllFilebinResponse(Object[] p)
bei Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer13.Serialize(Object objectToSerialize, XmlSerializationWriter writer)
bei System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
bei System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
bei System.Web.Services.Protocols.SoapServerProtocol.WriteReturns(Object[] returnValues, Stream outputStream)
bei System.Web.Services.Protocols.WebServiceHandler.WriteReturns(Object[] returnValues)
bei System.Web.Services.Protocols.WebServiceHandler.Invoke()
--- Ende der internen Ausnahmestapelüberwachung ---


Thanks,

Christoph
AnswerRe: Webservice written in VB.NET Pin
kubben30-Jul-07 6:43
kubben30-Jul-07 6:43 
GeneralRe: Webservice written in VB.NET Pin
microdommi30-Jul-07 10:19
microdommi30-Jul-07 10:19 
QuestionHow to Search a datagrid in SQL, VB.net Pin
Vimalsoft(Pty) Ltd30-Jul-07 3:33
professionalVimalsoft(Pty) Ltd30-Jul-07 3:33 
AnswerRe: How to Search a datagrid in SQL, VB.net Pin
penguin500030-Jul-07 10:25
penguin500030-Jul-07 10:25 
QuestionViewState Not Refreshing Pin
Brendan Vogt30-Jul-07 3:14
Brendan Vogt30-Jul-07 3:14 
AnswerRe: ViewState Not Refreshing Pin
Dave Kreskowiak30-Jul-07 9:21
mveDave Kreskowiak30-Jul-07 9:21 
Questionhaving a inner table in a dataset Pin
ajith prasath30-Jul-07 2:04
ajith prasath30-Jul-07 2:04 
AnswerRe: having a inner table in a dataset Pin
Dave Kreskowiak30-Jul-07 9:06
mveDave Kreskowiak30-Jul-07 9:06 
Questionwebbrowser control Pin
Ahmad Zaidi30-Jul-07 1:54
Ahmad Zaidi30-Jul-07 1:54 
AnswerRe: webbrowser control Pin
Dave Kreskowiak30-Jul-07 9:04
mveDave Kreskowiak30-Jul-07 9:04 
GeneralRe: webbrowser control Pin
Ahmad Zaidi30-Jul-07 22:04
Ahmad Zaidi30-Jul-07 22:04 
Questionhow to update the dataset programically to database in vb.net Pin
ajith prasath30-Jul-07 1:53
ajith prasath30-Jul-07 1:53 
AnswerRe: how to update the dataset programically to database in vb.net Pin
DanB198330-Jul-07 9:54
DanB198330-Jul-07 9:54 
Questionslider on ruler control [modified] Pin
eyes200730-Jul-07 1:11
eyes200730-Jul-07 1:11 
Questionhow to print the contents of rich text box Pin
eyes200730-Jul-07 1:09
eyes200730-Jul-07 1:09 
AnswerRe: how to print the contents of rich text box Pin
Dave Kreskowiak30-Jul-07 8:59
mveDave Kreskowiak30-Jul-07 8:59 
Questionvb.net 1.1 DataGrid Pin
A.Surendar Reddy29-Jul-07 23:03
A.Surendar Reddy29-Jul-07 23:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.