我正在尝试将 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