Set IIS 6.0 Execute Permission to None programmatically
am 25.01.2008 02:53:02 von MichaelKim
The module is working and I need to add one more step to set "Execute
Permission" to "None" programmatically. Any help me on what property name
and value should i set here, would be appreciated - also where can i find
exaustive list of this type of properties? Thank you.
//---------------------------------------------------------- ------------------------
private DirectoryEntry _iisServer;
.....
DirectoryEntry newVirDir;
newVirDir = _iisServer.Children.Add(nameDirectory,VirDirSchemaName);
....
newVirDir.Properties["Path"][0] = realPath;
// What properties and values needs to be set here???
....
newVirDir.CommitChanges();
Re: Set IIS 6.0 Execute Permission to None programmatically
am 25.01.2008 17:49:06 von Kristofer Gafvert
Hi,
This is specified in the AccessFlags metabase key.
Here's a list of metabase properties:
http://www.microsoft.com/technet/prodtechnol/WindowsServer20 03/Library/IIS/cde669f1-5714-4159-af95-f334251c8cbd.mspx
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
"Michael Kim" skrev i meddelandet
news:D27CA58D-6186-4961-8E27-9B79CC86306A@microsoft.com...
> The module is working and I need to add one more step to set "Execute
> Permission" to "None" programmatically. Any help me on what property name
> and value should i set here, would be appreciated - also where can i find
> exaustive list of this type of properties? Thank you.
>
> //---------------------------------------------------------- ------------------------
> private DirectoryEntry _iisServer;
> ....
> DirectoryEntry newVirDir;
> newVirDir = _iisServer.Children.Add(nameDirectory,VirDirSchemaName);
> ...
> newVirDir.Properties["Path"][0] = realPath;
> // What properties and values needs to be set here???
> ...
> newVirDir.CommitChanges();
>
Re: Set IIS 6.0 Execute Permission to None programmatically
am 25.01.2008 19:09:01 von MichaelKim
Thank you so much for your reply ... I found the proper flags and set the
value.
For those who needs this in the future, I'm sharing the code snippet below.
The access flag was not one-to-one mapping to the IIS interface though.
newVirDir.Properties["AccessExecute"][0] = 0;
newVirDir.Properties["AccessScript"][0] = 0;
0/0 set None for Execute Permission, 0/1 for Scripts only.
"Kristofer Gafvert" wrote:
> Hi,
>
> This is specified in the AccessFlags metabase key.
>
> Here's a list of metabase properties:
> http://www.microsoft.com/technet/prodtechnol/WindowsServer20 03/Library/IIS/cde669f1-5714-4159-af95-f334251c8cbd.mspx
>
> --
> Regards,
> Kristofer Gafvert
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> "Michael Kim" skrev i meddelandet
> news:D27CA58D-6186-4961-8E27-9B79CC86306A@microsoft.com...
> > The module is working and I need to add one more step to set "Execute
> > Permission" to "None" programmatically. Any help me on what property name
> > and value should i set here, would be appreciated - also where can i find
> > exaustive list of this type of properties? Thank you.
> >
> > //---------------------------------------------------------- ------------------------
> > private DirectoryEntry _iisServer;
> > ....
> > DirectoryEntry newVirDir;
> > newVirDir = _iisServer.Children.Add(nameDirectory,VirDirSchemaName);
> > ...
> > newVirDir.Properties["Path"][0] = realPath;
> > // What properties and values needs to be set here???
> > ...
> > newVirDir.CommitChanges();
> >
>
>