Automation of IIS Host Header entries RRS feed

  • Question

  • User2138731178 posted

    Hey Everybody

    I want to add host header entries on "this" computer. Can I do that with ASP.NET? What classes do I need to be looking at? The closest thing I've found was System.EnterpriseServices.Internal.IISVirtualRoot. According to the documentation, it "Creates and deletes IIS 6.0 virtual roots." That could be useful, but it's not what I'm looking for right now.


    Your help is appreciated.

    Thursday, April 10, 2008 3:29 PM


  • User-1853252149 posted

    On IIS 6 you need to use ADSI to do this I believe.  Check the Microsoft Scripting Center for samples.

    In IIS 7 you can do all this in ASP.NET.  Or even Notepad.  :)



    [EDIT]  Not ADSI, WMI.  Wasn't reading my own writing, sorry.  [/EDIT]

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Friday, April 11, 2008 8:58 AM