• Publisert
  • 1 min

Outgoing mails blocked by antivirus software

If your app is having trouble sending mail, your antivirus software may be to blame.

An EPiServer site I was working on recently used the ASP.NET ChangePassword control which involves sending outgoing mails. 

My Web.config was set up to use localhost (monitored by smtp4dev for outgoing mails:

<smtp deliveryMethod="Network">
        <network host="localhost" port="25" userName="" password="" defaultCredentials="false" />

Upon testing, no mails were sent. .NET threw alternating error messages:

"Unable to read data from the transport connection: net_io_connectionclosed"
"An established connection was aborted by the software in your host machine"

 It turned out that the outgoing mails were blocked by antivirus software on my machine. To solve this, I added the Visual Studio worker process (WebDev.WebServer.exe if you're using VS integrated dev server, aspnet_wp.exe/w3wp.exe if using IIS) to the list of excluded processes in the anti-virus software. After this, mails were sent without errors.