Solved

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

Posted on 2011-09-28
6
655 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now