4

默认限制:文件大小限制设置为 26214400 字节。如果我扫描文件大小> 25mb,则会出现错误。

The maximum stream size of 26214400 bytes has been exceeded.

我尝试改变:

 public ClamClient(string server, int port)
        {
            MaxChunkSize = 131072; //128k
            MaxStreamSize = 209715200; //200mb ,- 26214400; //25mb
            Server = server;
            Port = port;
        }

但是扫描文件时出现错误:

Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

如何在 Window 中更改 Clamd 服务的限制文件大小?

谢谢大家。

4

1 回答 1

11

您需要更改 nclam 配置(“clamd.conf”):

StreamMaxLength 50M

您还必须使用更高的 MaxStreamSize 更改 ClamClient 实例:

var client = new ClamClient("localhost", 3310)
{
     MaxStreamSize = 52428800
};
于 2017-05-29T14:51:26.760 回答