Sharepoint ConnectionString for Jobs

THX to Elitzur and Eran for this one!!!

if u ever make a job in SP and in the job u want to get a connectionString from our beloved ConfigurationManager you will not find it!

this is becuz the OWSTIMER process (SharePoint Timer Service) has its own config file.

go to your 15\BIN (or 14\BIN) and find OWSTIMER.EXE.CONFIG and put ur connStr there.
dont forget to refresh the OWSTIMER.

some more info about jobs (for noobs like me XD):
jobs r running in the OWSTIMER process and therefor dont have any context(es) with them, so you cant cache stuff (my original will), you dont have ur web.config and other IIS related stuff.


Popular posts from this blog

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

c# Service Play Sound with NAudio example by Moshe

MatDatePicker Errors