System.Net.Mail.SmtpException...

Problem

You get this error when sending email from a web page in your application:

An unhandled exception ('System.Net.Mail.SmtpException') occurred in WebDev.WebServer.EXE

This typically occurs when an attempt to send email from a page causes an exception in the SMTP server, such as improper configuration of the server or an invalid server.  The same situation may occur if you are using Microsoft IIS or the ASP.NET Development Server.

Solution

Step 1:  Open the 'Configure Email Server Connection' dialog to fix any errors.

Step 2:  Restart the Microsoft IIS web server.

Step 3:  Rebuild and run your application.

See Also

Part VII:  Troubleshooting Applications

Application Will Not Run

Application Runs But No Data is Displayed

Application Error Messages