Solved

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

Posted on 2011-09-28
6
702 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Technology Resume 7 69
Reactjs with .NET 3 78
Securing WEBAPI on Azure 2 27
Pass SQL to JSON. Page is in classic ASP and using Jquery 4 40
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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