Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Reading web.config from Timer Job



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();
Read More......


This post first appeared on Codeanswer, please read the originial post: here

Share the post

Reading web.config from Timer Job

×

Subscribe to Codeanswer

Get updates delivered right to your inbox!

Thank you for your subscription

×