.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Code Snippets >> ADO.NET >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Reading web.config from Timer Job

Posted By:Sagar Pardeshi       Posted Date: February 25, 2010    Points: 10    Category: ADO.NET    URL: http://www.dotnetspark.com  

Reading web.config from Timer Job. to read the connection string from the Web.config of the Web Application

Configuration config=System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/",SPContext.Current.Web.Site.WebApplication.Name);

string  _sqlConnectionString = config.ConnectionStrings.ConnectionStrings["DBConnectionString"].ToString();  


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend