prashant1979
11-23-2009, 11:50 AM
One of my customers has developed a website in asp.net 2.0. He has a web.config file in the website's parent directory. He has another folder in the website which has another asp.net application. The folder also has a web.config directory for the same application. The folder again has a sub-folder with a web.config file which has some functionality required for the application. The main web.config file is in the folder inside the parent directory and the web.config file contains the connection string. The problem is that the application does throws sql connection error because of this. If the web.config file inside the sub-folder is renamed or deleted, the application works fine and it connects to the database. The main folder of the application is a virtual directory in IIS 6. Now the issue is that the functionality defined in the renamed web.config file does not work and they require that. I suggested the programmer to create a DLL for the functionality instead of defining it in the web.config file. However, his senior says that it is not because of the multiple web.config files and multiple web.config files work fine and he has done that before. I tried to explain him that if you want separate web.config files for each directory, then the directory should be a virtual directory which is considered as a web application by IIS 6. He is not agreeing with me on this. I am no programmer and hence don't know the terms, but I understand from my past and vast experience that what I say is correct. Can anybody help me to understand what is the actual fact and what is the solution?
