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序列化产生错误。

声明: 本文采用 BY-NC-SA 协议进行授权. 转载请注明转自: wcf相关问题
本文的评论功能被关闭了.