Setting "AuthNTLM" property to virtual directory is not updated when using Directory Services

I am trying to set authentication for the virtual directory to use windows authentication.  It doesn't matter what value (i.e. True or False) I assign to vDir.Properties("AuthNTLM").Item(0) it doesn't seem to take and defaults to inheriting the settings from the site.  

Any ideas on overriding the inherited authentication for the site?

Here is my code:

Dim IISSchema As New DirectoryEntry("IIS://" & webSite & "/Schema/AppIsolated")
        Dim canUpdate As Boolean = Not IISSchema.Properties("Syntax").Value.ToString.ToUpper() = "BOOLEAN"
        Dim IISAdmin As New DirectoryEntry("IIS://" & webSite & "/W3SVC/1/Root")

        If canUpdate Then
            For Each vDir As DirectoryEntry In IISAdmin.Children
                If vDir.Name = appName Then
                   vDir.Properties("AuthNTLM").Item(0) = True
                End If
        End If

Thanks for your help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>Dim canUpdate As Boolean = Not IISSchema.Properties("Syntax").Value.ToString.ToUpper() = "BOOLEAN"

Not sure what's going in above statement
reiszjAuthor Commented:
CodeCruiser thanks for your fast reply, but removing the check if IIS is running under Windows NT didn't fix the issue.  I commented out the top 3 lines and the if statement for canUpdate and I got the same result that authentication is not being changed.
reiszjAuthor Commented:
I was able to solve the problem by setting vDir.Properties("AuthAnonymous").Item(0) = False as well.

CodeCruiser thank you for your many suggestions.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Glad to help :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.