What is the exact file path of the applicationhost.config file in the different versions of IIS, for example: IIS 7, 7.5, 8, 8.5 and 10?
            Asked
            
        
        
            Active
            
        
            Viewed 9.7k times
        
    73
            
            
         
    
    
        Danny Beckett
        
- 20,529
- 24
- 107
- 134
 
    
    
        Kathir Subramaniam
        
- 1,195
- 1
- 13
- 27
- 
                    1If anyone is looking for their **machine.config**, powershell can tell you for your active environment `[Runtime.InteropServices.RuntimeEnvironment]::SystemConfigurationFile` note if the result has *Framework64* in the path if you're looking for the 64bit config – Chris Marisic Nov 02 '20 at 16:40
2 Answers
130
            For the "big" IIS versions since IIS 7, the location is always the same:
 %windir%\System32\inetsrv\config\applicationHost.config
For IIS Express there is one per user, the default location is:
%USERPROFILE%\Documents\IISExpress\config\applicationhost.config
again it's the same for all versions.
You can run multiple instances of IIS Express per user, you would need to specify the location of the applicationhost.config as the command line parameter /config for iisexpress.exe
 
    
    
        Peter Hahndorf
        
- 10,767
- 4
- 42
- 58
- 
                    3The part for IIS Express is not 100% correct. IIS Express command line interface allows a config file to be loaded from anywhere. The default one is primarily used by Visual Studio. – Lex Li Jun 18 '15 at 13:51
- 
                    @LexLi `The default one is primarily used by Visual Studio` where is that located?? – harishr Oct 04 '17 at 11:45
- 
                    @hr-tis - The default one for IIS Express is the second location mentioned in the answer. – Peter Hahndorf Oct 05 '17 at 02:15
- 
                    12If you start a web app directly from Visual Studio (2017) the file used is: `[SOLUTION ROOT FOLDER]\.vs\config\applicationhost.config` Tip: If you right-click the IIS Express icon in taskbar and select Show All Applications, you can click on each site to see the paths used. – savehansson Aug 08 '18 at 12:43
- 
                    1update on SaveHansson's comment: In Visual Studio 2019, `[SOLUTION ROOT FOLDER]\.vs\config\[SOLUTION NAME]\applicationhost.config]` (the SOLUTION NAME part is new). – Elliott Beach Aug 01 '19 at 01:14
- 
                    Mine was at, [SOLUTION ROOT FOLDER]\.vs\[SOLUTION NAME]\config\applicationhost.config (slightly different order) – EzaBlade Feb 03 '22 at 09:03
1
            
            
        You can delete one or more site in IIS server 7 or above using the application host config file which resides under the "windows/system32/inetsrv/config" folder.
If you want more detailed information then you can read this blog post Delete or manage one or more IIS websites through application host configuration file
 
    
    
        mohammed wazeem
        
- 1,310
- 1
- 10
- 26
 
    
    
        negaboys
        
- 42
- 4