Results 1 to 8 of 8

Thread: Add Domain 2 IIS

  1. #1
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default Add Domain 2 IIS

    Hi All,

    Helm does a good job at adding domains to IIS. I have tried to write a script in the past to do this which was launched during install of web app, it worked but it was a bit of a guess.

    Does anyone have any decent scripts to add / edit / delete domains in IIS, config virtual directories, host names etc or can you point me to any good sites with info.

    Thanks

    James

  2. #2
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Its all done with ADSI - have you had any experience with this?
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  3. #3
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    I would have to check the script that I wrote but it sounds familiar, the main problem I had was I was guessing what I was doing. I tend to program in .net and did not find any decent resources to follow.

    If you know of any resources then that would be useful else I will look at safari as recently signed up.

    James

  4. #4
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    The following is the official and easy to use ADSI documentation...

    http://msdn.microsoft.com/library/de...73bd8532ef.asp

    If you need any help, just ask - Im pretty fluent with the IIS ADSI Provider
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  5. #5
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Here is a spot of code that may help you start, this is taken from a VBScript uses to modify script/application mappings on a IIS website:

    Code:
    Option Explicit
    
    Dim ScriptMappings
    Dim oIIS, oIISSite, oIISRoot
    
    Set oIIS = GetObject("IIS://LOCALHOST/W3SVC")
    
    For Each oIISSite In oIIS
    	If (oIISSite.Class = "IIsWebServer") Then
    		WScript.Echo "WWW Site: " & oIISSite.Name & " - " & oIISSite.ServerComment
    		
    		Set oIISRoot = oIISSite.GetObject("IIsWebVirtualDir", "ROOT")
    		ScriptMappings = oIISRoot.ScriptMaps
    		
    		' ScriptMappings modified here
    		
    		With oIISRoot
    			.ScriptMaps = ScriptMappings
    			.SetInfo
    		End With
    		
    		Set oIISRoot = Nothing
    	End If
    Next
    
    Set oIIS = Nothing
    Set oIISSite = Nothing
    Set oIISRoot = Nothing
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  6. #6
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    Cheers for the code snippet, I checked at work today and indeed I had used ADSI. When I did the integration there was very little doc on doing it with asp.net which is my prefered framework compared to asp (run away ahhh). I have had a search again on google and can see quite a bit of docs on adsi using asp.net v2.0, but not v1.1.

  7. #7
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Quote Originally Posted by jimlewis
    Cheers for the code snippet, I checked at work today and indeed I had used ADSI. When I did the integration there was very little doc on doing it with asp.net which is my prefered framework compared to asp (run away ahhh). I have had a search again on google and can see quite a bit of docs on adsi using asp.net v2.0, but not v1.1.
    Ahh.. Ive never done it with .NET, but the actual ADSI interface/specification should still be the same, only the way you use/call it should be different.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  8. #8
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    One of the best resources for this is:

    http://www.iisfaq.com/default.aspx?View=P109

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Modification of IIS config by software
    By cswd in forum Development Support
    Replies: 2
    Last Post: 19th April 2006, 05:15 PM
  2. mod_rewrite but for IIS?
    By Reactivate in forum Sales and Service Feature Enquiries
    Replies: 10
    Last Post: 30th January 2006, 09:54 AM
  3. Global.asa and restarting IIS
    By terraqueotenaz in forum ASP (VBScript)
    Replies: 1
    Last Post: 8th August 2005, 05:58 AM
  4. php 5 + mysql 4.1 + IIS
    By terraqueotenaz in forum General Technical Support
    Replies: 3
    Last Post: 1st August 2005, 04:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •