SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get connection string from web.config inside TimerJob?

share|improve this question
What are you exactly looking for? – Vedran Rasol Sep 15 '11 at 11:02
up vote 1 down vote accepted

Here you have procedure that will read web.config keys inside Timer Job:

For future readers: Be sure that you also read comment written by @Wictor (!)

share|improve this answer
Thank you very much. That's what I was looking – vvk Sep 15 '11 at 11:32
I recommend not to store any configuration needed in SharePoint in the web.config. Use other alternatives such as the property bags (see SharePoint Patterns & Practices hierarchical config for instance) – Wictor Wilen MCA MCM MVP Sep 15 '11 at 11:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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