Solved

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

Posted on 2011-09-28
6
641 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

13 Experts available now in Live!

Get 1:1 Help Now