Skip to main content

Cloud

Email Received Event Receiver Requires a SharePoint Timer Reset

While working with a couple different types of event receivers in Visual Studio 2010, I noticed an inconsistency between the ‘item added/adding events’ and the ’email received’ event receiver in terms of deployment from Visual Studio.When deploying from Visual Studio via the F5 key everything worked as expected with the item added/adding events.This is also true for the latter, but only upon the very first deployment.I made a few minor changes to my code, redeployed the event receiver (which includes an automatic IIS reset), and discovered no changes had been made.The original code from the first deployment of the ‘Email Received’ event receiver was firing instead.

After doing some researching I learned that the ‘SharePoint 2010 Timer’ contains it’s own cached copy of the original dll. An IIS reset alone will not update the Timer’s cache.The solution is to restart the SharePoint 2010 Timer service after each IIS reset. This will refresh the timers cache with the most current assembly.

The blog below contains some great tips on debugging SharePoint Timer jobs.

http://www.codeproject.com/KB/sharepoint/debugging-sharepointjobs.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Steven Mierop

As a Lead Technical Consultant at Perficient, I've had the pleasure of designing and delivering custom solutions on SharePoint 2007-2013. I have a strong passion for web application development and the .NET framework. Over the past three years, I have implemented a variety of SharePoint and .NET solutions for clients in a wide range of Industries such as Health Care, Insurance, Pharmaceutical, and Publishing.

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram