![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Two way function does not return data with custom data types I have been trying to get started with WCF and have hit a wall. I have a self-hosted WCF service that uses dupex netTcpBinding to allow two-way data flow. So far it works great with sending basic data types as a return value when I call a method from a client, but when I return a custom class or structure, its data members always come back as nothing. Any ideas? Here is a sample of my implementation: <ServiceContract(SessionMode:=SessionMode.Required, CallbackContract:=GetType(IServerCallback))> _ Interface IServer <OperationContract(IsOneWay:=False, IsInitiating:=True, IsTerminating:=False)> _ Function Login() As LoginResult End Interface <DataContract()> _ Public Class LoginResult <DataMember()> _ Public Value As String End Class <ServiceBehavior(ConfigurationName:="GameStreet.GSTalkServer", _ InstanceContextMode:=InstanceContextMode.PerSession, _ ConcurrencyMode:=ConcurrencyMode.Multiple)> _ Public Class MyService Implements IServer Public Function Login() As LoginResult Implements IServer.Login Dim oRes As New LoginResult oRes.Value = "Any value..." Return oRes End Function End Class |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Problems with data types | PowerShell | |||
| Registry and data types | PowerShell | |||