Saturday, March 31, 2012

web.config file

Hi, I am new to asp.net .. can anyone clearly explain what is a web.config file is used for ? can we have more than 1 web.config files in a Project if so .. can we name them as web1.config, web2.config files ? Orelse r we r expected to have just web.config file and if we want another .config file place it in a directory ? Plz someone tell me !!!Hello, first of all, you should always have a web.config file in your root directory of your web application, if you need any more web.config files for any folder inside your web application, first of all you should make that folder a virtual directory and then put inside it a web.config file. You always use web.config, the same name and web1, web2, NO. ALways the same name and in each virtual directory you can place sucha file with the configuration settings that you want to apply to the specific folder.
The web.config file is nothing but a configuration XML file, where you set or place general configuration for the whole web application to read from. I would recommend that you read this article on msdn which will give you a clear idea about the web.config file.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetconfiguration.asp

Best of Luck

0 comments:

Post a Comment