cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anilkumar_mca
Level 8

Does anyone know how to programmatically remove Anonymous Access from an IIS?

Hi,

I want to remove or add 'Anonymous Access from or to an IIS'...

i can do that for root level in .ism, but i want to do the reverse action to a folder...

eg:-
for MyVirtualDir -> removed 'Anonymous Access'
for a folder in MyVirtualDir\WebServices -> i want to assign 'Anonymous Access'

Can anybody send me a VB script file or installscript to do this...
I am using InstallScrip MSI project..

Thanks in advance
Labels (1)
0 Kudos
(5) Replies
ChandanOmkar
Level 8

after creating the object, you can use the following line of code to disable the anomnymous access. set this to TRUE to enable.


objVirtDir.AuthAnonymous = FALSE;
0 Kudos
anilkumar_mca
Level 8

Hi ChandanOmkar,

If you have complete code, can u send it to me 😞

I want to enable it to a particular sub folder....
0 Kudos
ChandanOmkar
Level 8

Hope the attached code will help you....



please let me know if you need any more help.
0 Kudos
anilkumar_mca
Level 8

Hi,

Thanks for your code.....do u have any idea how to assign the Anonymous access at folder level?

currently with your code we can set at root level, but is it possible at folder level?
0 Kudos
ChandanOmkar
Level 8

After the root, you can mention the folder name :

IIS://localhost/W3SVC/1/Root/
0 Kudos