Which is the Web.Config on IIS 7.5

iis-7.5rewritewindows-server-2008-r2

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

Best Answer

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?