私はWCFサービスを使用しています。私が持っている問題は、ダブルメモリを使用した起動です。WCFメモリが劇的に増加します
私は
<wsHttpBinding>
<binding name="secureHttpBinding" closeTimeout="04:01:00" openTimeout="04:01:00" receiveTimeout="04:10:00" sendTimeout="04:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<security mode="Transport" >
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
<endpoint address="https://localhost/test.svc"
binding="wsHttpBinding"
bindingConfiguration="secureHttpBinding"
contract="IWcfContract"
name="SecureBasicHttpBinding_WcfContract">
を結合すると、ここで私はここで
using (Stream fileStream = File.OpenRead(logsZipFullPath))
{
// Call web server
UploadFileResponse response = _webServiceHelper.UploadFile(fileStream, currentDate, ".zip", string.Empty);
fileStream.Close();
}
をアップロードするために使用していたコードは、私のモデルは私のzipファイルがである
[MessageContract]
public class UploadFileRequest : IDisposable
{
[MessageBodyMember(Order = 1)]
public Stream FileByteStream;
[MessageHeader(MustUnderstand = true)]
public string FileDescription;
}
ですHTTPSを使用しています80MB。
私が持っている問題は、サービスの開始時に使用しています26mbこれはかなり良いです。最初のコールでは、136MBが使用され、コールが完了すると、26mbになります。それはまた大丈夫です。アップロードの2回目の呼び出しの後、346MB を使用して開始します。サービスコール後に再び26mbになります。私の質問は、ファイルが唯一の80MBのときに346MBを使用している理由です。 GCとdisponseが正しく呼び出されました。しかし、これは正常な動作ですか、何かが欠けていますか?