Creating Virtual Directories

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Creating Virtual Directories

    I'm building an application that will host many subdomains under one domain.
    Each subdomain will be created on the fly by a user for demo purposes.

    Upon creation of a subdomain I need to create a Virtual Directory under the
    one main domain that points to another drive on the server, likely a SAN drive
    (ie; e:\drives\[subdomainname])

    I've been monkeying around a little with adsutil.vbs and mkwebdir.vbs to no
    effect. I'm guessing I have to have the web server run this as an admin?

    Any tips? Has anyone done any of these kinds of things in CF?

    Thanks,

    michaelmuller Guest

  2. Similar Questions and Discussions

    1. https and virtual directories
      I've never done a login to a website so please bear with me. What is the best way to go about this? Do I put all of the pages in a subdirectory...
    2. Virtual Directories?
      I have seen websites that use a sort of "virtual directory" system... Lets say when you click on something it goes to...
    3. virtual directories and IIS
      I created a new directory on my hard drive C:\test. I mapped a virtual directory called MyWeb to this directory. Now when I try to create an...
    4. Virtual Directories and ASP Session Var
      make sure session state is enabled in the virtual directory properties (configuration button on virtual directory tab). -- Mark Schupp Head of...
    5. Using virtual directories for common directories (scripts, images, styles, etc.)
      Hi, (sorry for the crosspost, I wasn't sure which was the best place to put this). I was just thinking about something and wondered if any of...
  3. #2

    Default Re: Creating Virtual Directories

    I have not had the need to do this as yet, but have research a bit.

    You can access the IIS admin objects by using the com object.

    Here are a couple of links (although not in cf)
    [url]http://www.sconklin.com/default.cfm?fuseaction=codelib.dsp_virdir[/url]

    I have seen your other post about this which also included something about
    db's (sql server).
    This can all be done using stored procedures.

    Ken

    The ScareCrow Guest

  4. #3

    Default Re: Creating Virtual Directories

    Ken,

    Quite excellent. I'll dig into this.

    But it underscores a point. It would be great for MM (or someone) to create a
    set of tools for doing this in CF directly. If CF is primarily a Windows
    platform application server, there should be some free hooks in the toolkit for
    doing some simple stuff like this. It's probably just a matter of wrapping
    some of the COM objects in CFCs or UDFs.

    And thanks for the tip about stored procedures. I can pass parameters to them,
    such as the un/pw to use. Sure, that makes sense. Seems simple once you're on
    the right track. I've just never done either of these things. I'm glad I'm
    finally graduating away from Access. It was very good to me for a long time,
    but I'm looking forward to the power and speed.

    Thanks again. I'll post a follow-up if I have questions.

    michaelmuller Guest

  5. #4

    Default Re: Creating Virtual Directories

    You could also look at this in 2 ways.

    1.
    Supply the user with a user interface to do this, combination of cf and sql
    server stored procedures

    2.
    All handled by the backend, in this case I would most probably look at
    creating a dts package in sql server and just execute this dts package through
    the cf page.

    Ken

    The ScareCrow Guest

  6. #5

    Default Re: Creating Virtual Directories

    ScareCrow,

    So, I'm back on this task. What would you suggest for implementing these ADSI
    in CF? Are the objects the ADSI scripts touch exposed to CF in any way, ie;
    GetObject("IIS://" & sComputer & "/W3svc/1")?

    If you had to do this, how would you start?

    <%
    sComputer ="localhost"
    sPhyDir = "c:\adsi"
    sVirDir = "ADSITest"

    'Get Default Web Site Object
    set websvc = GetObject("IIS://" & sComputer & "/W3svc/1")

    'Verify by printing out ServerComment
    Response.Write "Comment = " & websvc.ServerComment & "<br>"

    'Get root of Default Web Site
    set vRoot = websvc.GetObject("IIsWebVirtualDir", "Root")

    'Get Class Definition of virtual directory
    Set ClassDefinition = GetObject(vRoot.Schema)

    'Get list of mandatory properties
    asMustHaves = ClassDefinition.MandatoryProperties

    'Get list of optional properties
    asMayHaves = ClassDefinition.OptionalProperties

    i=1
    %>



    michaelmuller Guest

  7. #6

    Default Re: Creating Virtual Directories

    Actually, now that I've done a little research, LINKD.EXE is an amazing little
    utility. Works at the NTSC level and IIS does respond. Here's an article about
    how it works, and the link to the utility.

    [url]http://www.pyeung.com/pages/win2k/hardlinks.html[/url]


    [url]http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee[/url]
    -b18c4790cffd&displaylang=en

    junction.exe would probably have worked too, but the page everyone links to is
    no longer there, and I'd rather use a utility MS made to use on a MS box if
    it's free and I can do it.

    michaelmuller Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139