#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0

    How to programtically(VB.net) create new website & vir dir on remote IIS server


    Hi,
    We are having IIS 6.0 and I want to automate my routine task of creating website on remote server.i.e. want to write a program in VB.net to automate this routine task:
    Common steps are
    (a) Create a new site.
    (b) Note down the identification number (get information about the ID generated as this will be used to create virtual directory)
    (c) Create virtual directory
    (d) Assigned site to existing Application pool and
    (e) Sometime create new application pool

    Question:
    I want to achieve above through a program in VB.net.
    How to start and from where I can get information?
    I tried to look at following link.
    msdn.microsoft.com/en-us/library/ms524896.aspx
    But failing to understand especially how to create stuff on remote server?
    A sample program would be helpful.


    Regards
    Nehal
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    Typically you create a site on a local server then upload to a remote server.

    I haven't used newer Visual Studio, VS6 you could install server components that would let you use visual studio development tools directly on the remote server.

    There was an article in Windows IT Pro magazine a few months ago about IIS administrative scripting with lots of example scripts, maybe you can dig that article up for some more ideas.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0
    Let me explain the query with example;
    I have to create a site 'test' on 2 web server web1 and web2.
    Web1 IP = 10.00.00.1
    Web2 IP = 10.00.00.2

    So i go to the web1 and create new site manually i.e. through II manager.
    In site creation i assign site a IP address say 10.01.01.01, code directory path and create 2 virtual directory.
    Then i connect to web2 through IIS manager. Again assign site a IP address say 10.02.02.02, code directory (path on web2) and create 2 virtual directory.

    I have to create number of site in a day and i want to automate above steps by writting program in vb.net.

    Note: i can use command line and scripts but i have some other requirement which is already program in vb.net. So i want information about how to achieve above using vb.net code.

    Regards
    Nehal Shah

IMN logo majestic logo threadwatch logo seochat tools logo