Tip – Timer Job Constructor in SharePoint

Tip – Timer Job Constructor in SharePoint
3 votes, 5.00 avg. rating (97% score)

Tip – Timer Job Constructor

Default constructor in timer job class is mandatory else you end up with the error “TimerJobxxx cannot be deserialized because it does not have a public default constructor.” when activating the feature that installs the job. You should have constructor like below code

public TimerJob(SPWebApplication webApp): base("TimerJob", webApp, null, SPJobLockType.ContentDatabase)
	this.Title = "TimerJob";

November 2, 2013 · Adi · No Comments
Tags: , ,  · Posted in: C#, Sharepoint 2010, Tips and Tricks

Leave a Reply

What is 13 + 5 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)