Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been searching the Internet for a way to remove a site from IIS7 using JavaScript. I've found, and used, a lot of examples on how to create a site and applications using JavaScript but not a single example on how to delete a site!

For example, I've figured out how to create a site using the examples found at

Does anyone know how to remove a site from IIS7 using JavaScript?

Please help!


share|improve this question

JavaScript is not meant to perform server side infrastructure operations - but if you insist on doing it you should wrap your operation (deleting the site using C#) in a web service exposed to JavaScript via static Page methods (assuming you are using and throw in a ScriptManager to access your web service. That way you can access the functionality to remove the site via JavaScript.

share|improve this answer
Actually, if you follow the link in the question you'll see that Windows Server accepts JavaScript as scripting language. – splattne Jun 8 '10 at 14:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.