General information
Category:
Internet applications
>>After doing a fair amount of research, I still have some questions of ADSI:
>>
>>How do I set the name of the server?
>>How do I set the home directory?
>>How do I add a default doc to the list?
>>
>>CopyHere is excellent. I wish I had known about this before I would have saved myself a lot of time.
>>
>>TIA
>
>Look at the documentation for wwWebServer and wwIISAdmin, which lets you do what you want. You'd have to pick your Web site first then call the various other functions with the ADSI path set to this Web site.
>
>Easy as pie...
Ok here's what I have so far. I'm so close.
oWebService = GetObject( "IIS://LocalHost/W3SVC" )
* I'd like to be able to name the server, but apparently you have to give it
* the next available number. That still possible I could use GetObject until
* I received an error incrementing by 1 and that would be my new server.
oWebServer = oWebService.Create( "IIsWebServer", "13" )
* If you call the virtual directory root. It attaches itself to the server you
* just created ( at least as far as the Management Console is concerned ).
oVirtualDir = oWebServer.Create( "IIsWebVirtualDir", "Root" )
oVirtualDir.Path = "D:\INetPub\WWWRoot\WConnect\"
oVirtual.AccessExecute = .T.
oVirtual.AccessRead = .T.
lcDefaultDocs = oVirtual.DefaultDoc
IF NOT EMPTY( lcDefaultDocs )
lcDefaultDocs = "Index.Htm, " + lcDefaultDocs
ENDIF
oVirtual.DefaultDoc = lcDefaultDocs
Great. Now how do I set the name of the web site? There has to be a way.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only