我正在尝试将maxBufferPoolSize与MaxReceivedMessageSize和MaxBufferSize一起设置。但是,当我尝试设置它时,我收到消息“'maxBufferPoolSize'不是'System.ServiceModel.BasicHttpBinding'的成员。”我使用的是VS 2010.从MS文档中,MaxBufferpoolSize是一个成员(http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxbufferpoolsize)。为什么我收到这个错误???请帮忙。谢谢。
Dim basicHttpBinding As BasicHttpBinding = New BasicHttpBinding()
Dim endpointAddress As EndpointAddress = New EndpointAddress("/test.svc")
basicHttpBinding.MaxReceivedMessageSize = "2147483647"
basicHttpBinding.MaxBufferSize = "2147483647"
**basicHttpBinding.maxBufferPoolSize = "2147483647"**
basicHttpBinding.OpenTimeout = New TimeSpan(0, 20, 0)
basicHttpBinding.CloseTimeout = New TimeSpan(0, 10, 0)
basicHttpBinding.ReceiveTimeout = New TimeSpan(0, 10, 0)
basicHttpBinding.SendTimeout = New TimeSpan(0, 10, 0)
Dim Svc As Svc= New ChannelFactory(Of Svc)(basicHttpBinding, endpointAddress).CreateChannel
'... do the binding
答案 0 :(得分:1)
根据评论,您使用的是Silverlight,因此该框架中不存在该属性。 Silverlight中没有缓冲池,这就是它无法编译的原因。