Friday, January 20, 2012

How to Read path of web.config in asp.net


You can get the path of the web.config which is available in the server.

Configuration config ;
string path = string.Empty;
config = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
path = config.FilePath;

path will have path of web.config file which is available in the server

I hope this article will be very helpful to all. Thanks for reading this article.

“Keep reading and share the knowledge”  
“Grow more trees to save Earth”

No comments:

Post a Comment