Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
1  
What are you exactly looking for? –  Vedran Rasol Sep 15 '11 at 11:02
add comment

1 Answer

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
2  
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
add comment

Your Answer

 
discard

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.