GeekInterview.com
Series: Subject: Topic:
Question: 162 of 348

One application can have only one Web config file - true or false

Asked by: Interview Candidate | Asked on: Sep 26th, 2006

Editorial / Best Answer

Answered by: Harit Pandya

Answered On : Oct 10th, 2006

An asp.net application is a virtual directory that you make on a web server. This application will take the settings of machine.config file if a web.config file is not available in that directory. Now if you create a sub directory inside a virtual directory and place another web.config file in the sub directory then the sub directory will take the settings of the web.config file in that particular directory.

So my answer is that an application can have more than one web.config file but they should be in different directories of that web application and also the sub directory that uses it should be a virtual directory

Showing Answers 1 - 20 of 20 Answers
Pronobesh

Answered On : Sep 27th, 2006

This statement is partially true,if you have more than one page you can create more than one web.config file.It's up to you.

  
Login to rate this answer.
balachandar

Answered On : Oct 4th, 2006

Its true,one application have only one web.config file

Yes  1 User has rated as useful.
  
Login to rate this answer.
Harit Pandya

Answered On : Oct 10th, 2006

An asp.net application is a virtual directory that you make on a web server. This application will take the settings of machine.config file if a web.config file is not available in that directory. Now if you create a sub directory inside a virtual directory and place another web.config file in the sub directory then the sub directory will take the settings of the web.config file in that particular directory.

So my answer is that an application can have more than one web.config file but they should be in different directories of that web application and also the sub directory that uses it should be a virtual directory

Yes  5 Users have rated as useful.
  
Login to rate this answer.
Ali

Answered On : Dec 25th, 2006

Depends, But YES

  
Login to rate this answer.
lalitha1024

Answered On : Feb 14th, 2008

View all answers by lalitha1024

Depends.... but answer is false because we can have more than one web.config files for an application. web.config file is unqiue for folder. one application can contain many folders, so one application can contain many web.config files.

  
Login to rate this answer.
ghanidhar

Answered On : Mar 5th, 2008

View all answers by ghanidhar

Actually it is False.If your web application has a well defined folder structure you can have as many web.configs as that of your folder structure.Lets Say For Example The Admin Folder in the application Can contain a web.config with all settings for the admin Role. If you have members you can have members folders with all the settings related to Members in another web.config

Yes  2 Users have rated as useful.
  
Login to rate this answer.
deepak81

Answered On : Mar 12th, 2008

View all answers by deepak81

Yes, one application can have only one web config file.

  
Login to rate this answer.
arora_simi

Answered On : Jun 29th, 2009

View all answers by arora_simi

We can use more than one web.config file to meet the different security and other configuration requirements of different directories, and in any case web.config file of subdirectory will take the precedence over file of root directory.

  
Login to rate this answer.

False,application may have more than one web.config file at different directory levels

  
Login to rate this answer.
sandeep verma

Answered On : Nov 14th, 2011

Anther Web config file also exist but in a website if they are in different folder.

  
Login to rate this answer.
dabeer_nastar

Answered On : Nov 15th, 2011

View all answers by dabeer_nastar

ASP.NET application can have more than one web.config file but in different directory or sub directory.You can't add more than one web.config file in the directory or sub directory.

Yes  1 User has rated as useful.
  
Login to rate this answer.
Yelnik Nidup

Answered On : Nov 18th, 2011

View all answers by Yelnik Nidup

Yes it is true

  
Login to rate this answer.
jat16may

Answered On : Nov 19th, 2011

One application may have more than one file but root can hold one web.config and if the folder then we can keep each folder one web.config file........

  
Login to rate this answer.
Nilpesh Patel

Answered On : Mar 30th, 2012

One application can have more than one WEB.config file but application root has only one. And any folder then we can add config file inside.

If we define same key in both config file then the config file inside the folder overrides the value of root config file.

  
Login to rate this answer.
mks87

Answered On : Apr 27th, 2012

View all answers by mks87

False

  
Login to rate this answer.
ashkarthi

Answered On : May 28th, 2012

View all answers by ashkarthi

False. There can be multiple web.config files in an application.

  
Login to rate this answer.
anoush

Answered On : May 31st, 2012

View all answers by anoush

True

  
Login to rate this answer.
Neeru Verma

Answered On : Jun 4th, 2012

No, There can be only one Web.config file in a project. Although we can have multiple .config* configuration) files in a project.

  
Login to rate this answer.
jamil

Answered On : Sep 7th, 2012

True

  
Login to rate this answer.
Jitender Sharma

Answered On : Sep 21st, 2012

False,Yes... A Project can have multiple web.config files, but they resides in separate folders...

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.