|
| Please Help,
We are working with IIS (version 5.1) on WinXP.
We created virual directory("VDir") using ADSI technology on JavaScript.
In Virtual direcory ("VDir") we have sub directory("VDire_Sub").
This Sub directory enherited Execute Permissions from Virtual
directory("VDir"),
We want to change Execute permissions for this Sub directory ("VDire_Sub")
to Scripts Only.
How we can do it?
Thank you,
Pola
"jmajors@cadxtras.com" wrote:
> Pola ,
>
> I have a VB 6 Sample that is just did it should be failrly easy to
> translate this to C++ ... hope this helps
>
> 'Create Web Application
> Public Function CreateWeb(ByVal sServer As String, ByVal sSiteName As
> String, ByVal sPath As String, ByVal bAccessRead As Boolean, ByVal
> bAccessScript As Boolean) As Boolean
> On Error GoTo handle_Err
> Dim IIsWebVDirRootObj As Object
> Dim IIsWebVDirObj As Object
> Dim sReturn As String
>
> ' Create an instance of the virtual directory object
> ' that represents the default Web site.
> 'Find Web Instance -------------> Param 1
>
> Set IIsWebVDirRootObj = GetObject("IIS://" & sServer &
> "/W3SVC/1/Root")
>
> ' Use the Windows ADSI container object "Create" method to create
> ' a new virtual directory.
> Set IIsWebVDirObj = IIsWebVDirRootObj.Create("IIsWebVirtualDir",
> sSiteName)
>
> 'Validate Directory Exists
> If Not DirectoryExists(sPath) Then
> msModError = "Source: CreateWeb :: Web Path: " & sPath & "
> Does Not Exist <br>"
> CreateWeb = False
> Exit Function
> End If
>
>
> With IIsWebVDirObj
> ' Use the Windows ADSI object "Put" method to
> ' set some required properties.
> .Put "Path", sPath
> .Put "AccessRead", bAccessRead
> .Put "AccessScript", bAccessScript
>
> ' Use the AppCreate2 method of the IIS ADSI provider to
> ' create an application on the new virtual directory.
> .AppCreate2 1
> .Put "AppFriendlyName", sSiteName
>
> ' Use the Windows ADSI object "SetInfo" method to
> ' save the data to the metabase.
> .SetInfo
> End With
>
> Set IIsWebVDirObj = Nothing
> CreateWeb = True
> Exit Function
>
>
>
> handle_Err:
> msModError = "Error: CreateWeb :: Description: " &
> Err.Description & " :: Error Number = " & Err.Number & "<br>"
>
> CreateWeb = False
>
> End Function
>
> John
>
>
|
|