Setting a code path for a new post should be as fast a possible. But in this process a lot of time gets killed in indexing logic and sending emails. It is a tiresome process as System.Web.Mail, which is a built-in system, connects to a SMTP server and then emails are sent one by one.

In such a situation Timer class which is found in the system.threading namespace is a useful technique for background processing. This Timer if created is capable of invoking a specified callback on a particular thread from threadpool. This interval of callback can be configured at a regular interval. Therefore you are open to set up a code for execution without invoking any incoming request to ASP.NET.
                    

Copyright © 2008 VisualBuilder. All rights reserved