0

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

1 回答 1

1

根据评论,您使用的是 Silverlight,因此该框架中不存在该属性。Silverlight 中没有缓冲池,这就是它无法编译的原因。

于 2012-06-13T23:46:13.180 回答