how to create a IIS virtual directory programmatically??

Discussion in 'ASP General' started by Matt, Nov 9, 2003.

  1. Matt

    Matt Guest

    I want to write a web hosting application. But how to create a IIS virtual
    directory programmatically in ASP page??

    please advise!
    Thanks!
     
    Matt, Nov 9, 2003
    #1
    1. Advertising

  2. Matt

    Ray at Guest

    Take a look at:

    Start--Run---CMD--enter

    cscript %systemdrive%\inetpub\adminscripts\mkwebdir.vbs -help

    Ray at home

    "Matt" <> wrote in message
    news:...
    > I want to write a web hosting application. But how to create a IIS virtual
    > directory programmatically in ASP page??
    >
    > please advise!
    > Thanks!
    >
    >
     
    Ray at, Nov 9, 2003
    #2
    1. Advertising

  3. Matt

    dlbjr Guest

    'This will get you in the ball park!
    Set Root = GetObject("IIS://LocalHost/W3SVC/1/ROOT")
    if (Err.Number <> 0) then
    wscript.Quit
    end if
    Set Dir = Root.Create("IIsWebVirtualDir", "Test")
    Dir.Path = "C:\ "
    Dir.AccessRead = True
    Dir.AccessWrite = False
    Dir.EnableDirBrowsing = False
    Dir.AppFriendlyName = "Test"
    Dir.SetInfo
    Set Dir = Nothing
    Set Root = Nothing

    -dlbjr

    Discerning resolutions for the alms
     
    dlbjr, Nov 9, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Conorozzo

    Create IIS Virtual Directory from ASP.NET page...

    David Conorozzo, Nov 2, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    3,073
    David Conorozzo
    Nov 10, 2003
  2. Matt
    Replies:
    1
    Views:
    816
    Sherif ElMetainy
    Nov 10, 2003
  3. =?Utf-8?B?U3RlcGhhbmU=?=

    Cannot create Virtual Directory in IIS from asp.net

    =?Utf-8?B?U3RlcGhhbmU=?=, Dec 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    4,012
    =?Utf-8?B?U3RlcGhhbmU=?=
    Dec 9, 2004
  4. Crash
    Replies:
    0
    Views:
    932
    Crash
    Mar 20, 2008
  5. Eskimo
    Replies:
    5
    Views:
    164
    Joe Kaplan \(MVP - ADSI\)
    Nov 8, 2004
Loading...

Share This Page