wcf相关问题
2013年6月12日
代码绑定wcf
Dim address As New EndpointAddress(New Uri(“http://localhost:9179/SQLService.svc”))
Dim binding As BasicHttpBinding = New BasicHttpBinding()
binding.MaxReceivedMessageSize = 2147483647
binding.MaxBufferSize = 2147483647
binding.Security.Mode = SecurityMode.None
Me.channel = New ChannelFactory(Of HH.WMS.WcfService.ISQLServerDataProvider)(binding, address)
s = Me.channel.CreateChannel()
执行ExecuteDataTable提示
操作方法上加 ServiceKnownType(GetType(DBNull)) 描述
枚举值会造成wcf序列化产生错误。