感谢您使用微软产品。您可以利用ADSI的IIsWebVirtualDir对象的属性和方法来获得并改变虚拟目录的属性。通过设置IIsWebVirtualDir的AuthAnonymous为true,将允许匿名訪問,另外AnonymousPasswordSync,AnonymousUserName,AnonymousUserPass等属性与匿名訪問的用户名和密码设置有关。如下例:Private Sub Command1_Click()
Set cont1 = GetObject("IIS:// MachineName/W3SVC/1/ROOT/vdirName")
Debug.Print cont1.AnonymousUserName
Debug.Print cont1.Path
Debug.Print cont1.AuthAnonymous cont1. AnonymousPasswordSync=true
cont1. AnonymousUserName=”UserName”
cont1.AuthAnonymous = True
cont1.SetInfoEnd Sub详细信息请参考:
IIsWebVirtualDir
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html/psdk/asp/aore8v5e.asp- 微软全球技术中心 VB技术支持本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款
(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查
(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
Set cont1 = GetObject("IIS:// MachineName/W3SVC/1/ROOT/vdirName")
Debug.Print cont1.AnonymousUserName
Debug.Print cont1.Path
Debug.Print cont1.AuthAnonymous cont1. AnonymousPasswordSync=true
cont1. AnonymousUserName=”UserName”
cont1.AuthAnonymous = True
cont1.SetInfoEnd Sub详细信息请参考:
IIsWebVirtualDir
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html/psdk/asp/aore8v5e.asp- 微软全球技术中心 VB技术支持本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款
(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查
(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。
Set cont1 = GetObject("IIS:// MachineName/W3SVC/1/ROOT/vdirName")
Debug.Print cont1.AnonymousUserName
Debug.Print cont1.Path
Debug.Print cont1.AuthAnonymous cont1. AnonymousPasswordSync=true
cont1. AnonymousUserName=”UserName”
cont1.AuthAnonymous = True
cont1.SetInfoEnd Sub
详细信息请参考:
IIsWebVirtualDir
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html/psdk/asp/aore8v5e.asp- 微软全球技术中心 VB技术支持本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款
(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查
(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。