Recently we encountered an issue in running the code (with "SPContext") in Timer job. After doing the learning, I understood the that the SPContext will not work in
1. Timer Job 2. Event Receier 3. Console and windows application running in the servers
Solution :
The solution is
using(SPSite oSite = new SPSite(this.WebApplication.Sites[0].Url))
No comments:
Post a Comment