Code (RSS)

Code

SMTP Server not available and Mcafee

Received a lot of activity recently on an older post surrounding an exception received when trying to send email.  Thought I would summarize the information in a new post to hopefully help others out there.

The problem surrounds receiving an exception

[COMException (0x80040211): The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available]

when trying to send an email using System.Web.Mail in the framework.  The problem is caused by having McAfee VirusScan on the server and having OnAccessScan enabled (at least it was in the discussion we were having, there may be other causes that we haven't discussed.)  Thanks to David for further confirmation and too Marcel (see last comment) for the following steps to work around the issue in McAfee VirusScan Enterprise 8.0.

- go to VirusScan Console
- Right-click Access Protection
- Click "Properties"
- Go to Port-Blocking tab
- Select Rule: "Prevent mass mailing worms from sending mail"
- Click Edit (in order to edit this rule)
- Add "aspnet_wp.exe" to the exclusion list

Other products such as Norton and other antiviral or firewall software may cause the same issue, but I'll bet the underlying issue is the same.

Hope this helps others out there.

Parsing Web Command-Line Args

I had a need to pass a parameter to a smart client exe I'm creating for a project.  Found this example, which seems to work quite nicely.  Wanted to put this on here so I can find it again in the future.

TSQL Optimization

Saw this in CODE magazine. Maybe this is common knowledge, but want to make sure I don't forget it.
Appears that that using multiple SET statments to setup variables like:
SET @foo1 = 0
SET @foo2 = 0
SET @foo3 = 0
...


is slower than one SELECT like:


SELECT @foo1 = 0, @foo2 = 0, @foo3 = 0


makes sense once you understand that behind the scenes each SET statement is converted to an individual SELECT statement.

Great article, but that tidbit makes it well worth reading

SystemWebMail FAQ

Just found this FAQ for the SystemWebMail namespace.  Lots of good information here.  Some sections lead you to check out their mail products (which I have not tried and have no opinion one way or the other of), but still some usefull info.