Yogendra Sahu

Yogendra Sahu

  • 1.1k
  • 587
  • 137.9k

Can't connect to the ClamAV container through ASP.NET.

May 16 2019 7:27 AM
I have gone through this below mentioned link for creating a connection but it is for Linux and we want to do it in Windows.
 
http://jasonhaley.com/post/Virus-Scan-File-Uploads-Using-Multi-Container-Web-App
 
I got the "No connection could be made because the target machine actively refused it 127.0.0.1:3310"
 
error after executing this line
 
var clam = new ClamClient("localhost");
var result = await clam.SendAndScanFileAsync(path);
 
Following is the composition of docker-compose.yml file:
 
clamav-server:
image: grofit/clamav-windows
ports:
- "3310:3310"
filestorageutility:
image: filestorageutility
links:
- clamav-server
ports:
- "4719"
build:
context: .\FileStorageUtility
dockerfile: Dockerfile

Answers (2)