Try this:
System.Configuration.ConfigurationFileMap fileMap = new ConfigurationFileMap(strConfigPath); //Path to your config file
System.Configuration.Configuration configuration = System.Configuration.ConfigurationManager.OpenMappedMachineConfiguration(fileMap);
More Related Contents:
- Using different Web.config in development and production environment
- Avoid web.config inheritance in child web application using inheritInChildApplications
- ASP.NET web.config: configSource vs. file attributes
- Add MIME mapping in web.config for IIS Express
- Sharing cookies across different domains and different applications (classic ASP and ASP.NET)
- Cannot use a leading ../ to exit above the top directory
- What is the purpose of the Assemblies node in Web.Config?
- Building a COM interop library for ASP Classic using 4.0 framework and Visual Studio 2010
- How do I get the contents of a JSON file I added in the StartUp method to use it in one of my actions?
- what’s the issue with AttachDbFilename
- I just discovered why all ASP.Net websites are slow, and I am trying to work out what to do about it
- Has anyone implement RadioButtonListFor for ASP.NET MVC?
- How to programmatically clear outputcache for controller action method
- IIS7 folder permissions for web application
- Is there a way to automatically include content files into asp.net project file?
- IIS URL Rewrite and Web.config
- I’m lost. What happened to ASP.NET MVC 5?
- Can I incorporate both SignalR and a RESTful API?
- Why does the 2nd T-SQL query run much faster than the first when called by Reporting Services 2005 in a web-app
- What are the pros and cons of running IIS as 32bit vs 64bit on a 64bit OS?
- HttpServerUtility.UrlPathEncode vs HttpServerUtility.UrlEncode
- How to implement oauth2 server in ASP.NET MVC 5 and WEB API 2 [closed]
- Allow anonymous authentication for a single folder in web.config?
- Long-running ASP.NET tasks
- Page_ClientValidate is validating multiple times.
- Streaming large file uploads to ASP.NET MVC
- set cookie to expire at end of session? asp.net
- Implement JQuery Datatable in ASP.NET GridView
- What do the TargetFramework settings mean in web.config in ASP .NET MVC?
- Asp.Net Check file size before upload