Meeting the needs of your business from a distance

How to access web.config file at design time in Visual Studio

by mark shiffer 8. October 2009 21:52

Recently had to do this for some framework development and just noting here for future reference:

   1: IWebApplication webApp = (IWebApplication)Component.Site.GetService(
   2: typeof(IWebApplication) );
   3: Configuration config = webApp.OpenWebConfiguration(true);

Tags:

Websites | Programming

Comments

Add comment


(Will show your Gravatar icon)

  Country flag


  • Comment
  • Preview
Loading



Copyright © 2001-2012 MS Consulting, Inc. All Rights Reserved.