Solved

how do I know what web.config file is being used

Posted on 2011-09-28
6
672 Views
Last Modified: 2012-05-12
Greetings-
     I inherited a mess.  I have a broken website and I am looking at it in IIS7.  I cannot tell what web.config file is being used.  There are 15 of them in the directory.  I just don't know where to look.  Any direction would be great!

Thanks!
0
Comment
Question by:Daeta42
6 Comments
 
LVL 5

Accepted Solution

by:
Khalid Mehmood Awan earned 333 total points
ID: 36812885
Open project and open web.config and try saving it as (but dont save as actually), it will take you to the folder where it is located.

2nd way is to rename web.config files one by one if you can afford some down time :-)
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 36813097
there will be only one file with the name as web.config and rest all can be gracefully ignored
0
 
LVL 1

Assisted Solution

by:dannocracker
dannocracker earned 167 total points
ID: 36816000
Actually, there is a hierarchy of config files. Those which are below your web site's file override the ones above when a browser points there. See http://www.freewebdevelopersite.com/2011/04/17/asp-net-4-0-configuration-hierarchy-machine-config-and-web-config-inheritance/
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:Daeta42
ID: 36816130
Thank you all for the replies...  I learned so much.  I guess I should qualify my question.  How do I find out where it tells the site to use web2.config.  I found that the system is using that one via khalidmehmoodawan suggestion of renaming the files.  It was a tedious process and there has to be a way to tell the site to use that specific file.  I just dont know where.

Cheers!
0
 
LVL 5

Assisted Solution

by:Khalid Mehmood Awan
Khalid Mehmood Awan earned 333 total points
ID: 36817183
0
 

Author Closing Comment

by:Daeta42
ID: 36817198
Thank you all for the direction.  I learned a lot of things I didn't know before.  I was able to fix my issues and press forward.

Cheers!

~~Daeta
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question