Determine path to web.config at runtime
In C#, you can determine which web.config is being used with this:
String pathToConfig = System.Web.HttpContext.Current.Server.MapPath("/Web.config");
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
In C#, you can determine which web.config is being used with this:
String pathToConfig = System.Web.HttpContext.Current.Server.MapPath("/Web.config");