Open the applicationHost. config file located in C:\Windows\System32\inetsrv\config\.
Solution. The solution is to use AppCmd.exe. We can find it in C:\Windows\System32\inetsrv. Note: You need to open the backup file and check if it contains errors before you choose it to recover IIS.
Step 1: Open applicationHost.Click File, then Open, and in the File name: dialog box, type %windir%\system32\inetsrv\config\applicationHost. config and Click Open.
You should ignore .vs
folder all together.
However, there are cases where you want to persist some config on your applicationhost.config file such as registering FQDN as explained here.
For this type of config, you want to use the global application host file where you can persist your changes.
In a classic Web Application project (where you have .csproj
file), you need to set the UseGlobalApplicationHostFile
property to true
inside the .csproj
file:
<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>
VS 2015 honors this and uses the global application host file. However, there is no way to tell ASP.NET 5 projects to look for this today as far as I know.
If you need custom configuration for IIS Express (example), add the file to source control so that it is shared with the team. If not, you can exclude this file, and VS2015 will recreate it as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With