0

I have created a custom timer job. I deploy it with a feature that has a WebApplication scope. The Execute() method in my job definition class keeps throwing errors. I'm trying to get a reference to the Web Application in the Execute method, but nothing seems to work. I've tried several methods of getting this reference:

SPWebApplication webapp = this.WebApplication;

and

SPWebApplication webapp = this.Parent as SPWebApplication;

both of these are returning null.

Any clues what the issue could be?

0

Resetting the Sharepoint Timer Service fixed my issue:

Start>Control Panel>Administrative Tools>Services>SharePoint 2010 Timer

ref: https://sharepoint.stackexchange.com/a/22466/17398

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.