Careful with SPContext.Current…
...as it will be NULL within a Timer Job or Workflow. I have some shared Data Access classes that use SPContext.Current.Web all over the place and now that I want to use them from within a Timer Job, I have to refactor them to take a SPWeb as a Parameter...
June 12th, 2010 in
Development, Sharepoint
So are you going to create Fake SPContext.Current OR make the Timer Job execute in SharePoint's context?
Neither, since there is no Context, it runs side by side with SharePoint. I have to instantiate the SPSite or SPWeb that I want myself.