what is syntax to commit appicationHost.config changes using command prompt?

Had to made a changes to applicationHost.config file need to recommit changes how do I do commit those changes?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
There is no "recommit" object that is supported by appcmd.exe.

- Reference link:  http://www.iis.net/learn/get-started/getting-started-with-iis/getting-started-with-appcmdexe
- Quick Reference link:  http://blogs.msdn.com/b/mikezh/archive/2012/04/23/iis-appcmd-quick-reference.aspx

1. If you want to add new config object:  appcmd add apppool /name:NewAppPool
2. if want to update an existing config object:    appcmd set site "Default Web Site" /id:200

About the closest thing to a recommit is a restore of a backup.  For that the syntax is something like:

appcmd restore backup "Site001-backup-yyyymmdd"

kdschoolAuthor Commented:
In this case

2. if want to update an existing config object:    appcmd set site "Default Web Site" /id:200

do I just use the words default web site if that is the site and what does /id:200 mean?
Dan McFaddenSystems EngineerCommented:
In your example, you would use the "Name" of the website that you see in IIS Manager.  In IIS Manager, I name my websites by their URL.  So if I wanted to use appcmd to update an object on my website named www.example.org, the command line would be:

appcmd set site "www.example.org" /id:200

/id:200 means to set the website's ID to 200.  Another way of saying that is you are replacing the existing ID on the site with a value of 200.  You can see the ID of a site by opening IIS Manager, drill down on the server and expanding the Sites object on the left.  This is what you will see:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kdschoolAuthor Commented:
This is great information.  I found an article that said if I stopped and restarted the application pool and the WAS service it would correct the error I was getting.  That worked.  I had made a change tot he applicationhost.config file and I did not stop IIS before making the change.  Even though I the file was fined using appcmd list config I could not get rid of the error.  The error said to recommit the file.  Its corrected now. Thank you for this informaiton that would have been my next step.  I will award the points to you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.