WCF wsDualHttpBinding表示';无法分配托管内存缓冲区…';
我正在尝试使用“wsDualHttpBinding”将一个大对象(300 MB)从客户端上传到服务 使用“basicHttpBinding”,我可以上传大型对象(1.5GB文件) 我需要使用“wsDualHttpBinding”。但是,使用“wsDualHttpBinding”,我只能上传28MB 如果我上传100 MB的对象,它会说“分配托管内存缓冲区失败…” 你能告诉我,如何使用“wsDualHttpBinding”上传大对象(300MB)吗 提前感谢, 慕鲁甘 以下是我正在使用的配置:WCF wsDualHttpBinding表示';无法分配托管内存缓冲区…';,wcf,wsdualhttpbinding,Wcf,Wsdualhttpbinding,我正在尝试使用“wsDualHttpBinding”将一个大对象(300 MB)从客户端上传到服务 使用“basicHttpBinding”,我可以上传大型对象(1.5GB文件) 我需要使用“wsDualHttpBinding”。但是,使用“wsDualHttpBinding”,我只能上传28MB 如果我上传100 MB的对象,它会说“分配托管内存缓冲区失败…” 你能告诉我,如何使用“wsDualHttpBinding”上传大对象(300MB)吗 提前感谢, 慕鲁甘 以下是我正在使用的配置:
<wsDualHttpBinding>
<binding name="Test"
closeTimeout="04:10:00"
openTimeout="04:10:00"
receiveTimeout="04:10:00"
sendTimeout="04:10:00"
bypassProxyOnLocal="false"
transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
messageEncoding="Mtom"
textEncoding="utf-16"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<reliableSession
ordered="true"
inactivityTimeout="04:10:00" />
<security mode="Message">
<message clientCredentialType="Windows"
negotiateServiceCredential="true" />
</security>
</binding>
</wsDualHttpBinding>
简化问题并改进代码的格式。我会的。哎哟,对不起@Murugan-那个评论应该是一个编辑评论(例如,我已经做了那个些修改)简化了问题并改进了代码的格式谢谢David。我会的。哎哟,对不起@Murugan-那条评论应该是编辑评论(例如,我已经做了那些更改)
public interface IFileUploaderService
{
[OperationContract]
void Upload(MyFileInfo remoteFileInfo);
}
public interface IFileUploaderServiceCallBack
{
[OperationContract(IsOneWay = true)]
void OnNotificationSend(string message);
}
[MessageContract]
public class MyFileInfo : IDisposable
{
[MessageBodyMember(Order = 1)]
public System.IO.Stream FileByteStream;
public void Dispose()
{
if (FileByteStream != null)
{
FileByteStream.Close();
FileByteStream = null;
}
}
}