What do you call your service? I just tried this script (see the code below) and the server prints the values correctly.
Public Class StackOverflow_6116861_751090 <ServiceContract()> _ Public Interface ITest <OperationContract()> Sub Process(ByVal dict As Dictionary(Of String, String)) End Interface Public Class Service Implements ITest Public Sub Process(ByVal dict As System.Collections.Generic.Dictionary(Of String, String)) Implements ITest.Process For Each key In dict.Keys Console.WriteLine("{0}: {1}", key, dict(key)) Next End Sub End Class Public Shared Sub Test() Dim baseAddress As String = "http://" + Environment.MachineName + ":8000/Service" Dim host As ServiceHost = New ServiceHost(GetType(Service), New Uri(baseAddress)) host.AddServiceEndpoint(GetType(ITest), New BasicHttpBinding(), "") host.Open() Console.WriteLine("Host opened") Dim factory As ChannelFactory(Of ITest) = New ChannelFactory(Of ITest)(New BasicHttpBinding(), New EndpointAddress(baseAddress)) Dim proxy As ITest = factory.CreateChannel() Dim dict As Dictionary(Of String, String) = New Dictionary(Of String, String) dict.Add("o\ne", "uno") dict.Add("two", "do\s") dict.Add("th\ree", "tr\es") proxy.Process(dict) End Sub End Class
source share