5

i googled this and found it is storing inside my asp framework folder... but may i know which is the right web.config file for my specific application ? there is too many application running... and i found many web.config

i'm using window server 64 (so there is framework and framework 64)

my application pool is (application name)v4; pipeline integrated

1myb
  • 201
  • 1
  • 4
  • 10
  • Related: http://www.iis.net/configreference and http://www.iis.net/learn/get-started/planning-your-iis-architecture/the-configuration-system-in-iis-7 – Pacerier Aug 27 '15 at 16:19

1 Answers1

7

The IIS 7 configuration hierarchy works like this:

  1. Framework OR Framework64 Machine.config
  2. Framework OR Framework64 ASP.net Web.config
  3. System32\Inetsrv\Config\ApplicationHost.config
  4. Your Website\web.config Your
  5. Website\Appdir\web.config

The first two depend on the bitness of your application pool - the 64 version is the "root" of 64-bit app pool configuration.

Applicationhost.config contains entries applicable to either bitness32 or bitness64 using preConditions, so it's cross-bitness. Web.config files at lower levels in your site or content folders can also use preconditions.

If you want to apply a setting to a particular application, you apply it at the level closest to that application. If you want to apply it to everything on the box, you edit the Framework folder settings (which is generally a bad practice as it breaks xcopy deployability as a unit, but is sometimes unavoidable).

Does that answer your question?

TristanK
  • 9,073
  • 2
  • 28
  • 39
  • 1
    maybe it solve my question, because of the hierarchy is too complicated to me while i'm not experience in this field @>@ if i made an new site to host my php apps, which is should be ? no information to refer from iis GUI ? because i found most tutorial is also command based and gonna make me headache @.@ Thx – 1myb Mar 23 '11 at 06:24
  • The IIS GUI edits the web.config it thinks it needs to edit - all IIS settings are stored either in Applicationhost.config or web.config in your site's directories. So if you can set what you need to set through the GUI, you can just use that, and it should just work? What do you need to set? – TristanK Mar 23 '11 at 09:37
  • because i not sure on how to setting the url rewrite (http to https) the tutorial is http://weblogs.asp.net/owscott/archive/2011/02/26/url-rewrite-servervariables-url-parts-http-to-https-redirect-week-9.aspx – 1myb Mar 25 '11 at 23:52
  • Where does the CLRConfigFile element fit into this hierarchy? Does it? http://msdn.microsoft.com/en-us/library/aa347554(v=VS.90).aspx – mcintyre321 Apr 20 '11 at 16:55
  • at around the applicationhost level, I'd guess - ballpark of site web.config (4). – TristanK Apr 20 '11 at 21:40