这段代码用adsi,和vc怎么实现?

jenac 2003-04-07 05:47:36
<%

' Remember to enable Integrated Windows Authentication and

' disable Anonymous Access or you will get and Server 500 error.

Dim SecObj

Dim MyIPSec


' Get the IIS object that holds the info for the default site.

' This could be any site root/vdir, or IIS://LocalHost/W3SVC for global

' properties.

Set SecObj = GetObject("IIS://LocalHost/W3SVC/1/Root")

' Get the IIsIPSecurity object

Set MyIPSec = SecObj.IPSecurity

If (TRUE = MyIPSec.GrantByDefault) Then

Response.Write

"<BR>GrantByDefault was set to TRUE. Setting to FALSE.<BR>"

MyIPSec.GrantByDefault = FALSE

Else 'If (FALSE = MyIPSec.GrantByDefault) Then

Response.Write

"<BR>GrantByDefault was set to FALSE. Setting to TRUE.<BR>"

MyIPSec.GrantByDefault = TRUE

End If


' Set the info in the database

SecObj.IPSecurity = MyIPSec

SecObj.Setinfo

%>
这是一段配置IIS的代码,怎么用VC++来写呀?
...全文
44 点赞 收藏 1
写回复
1 条回复
clipper_clipper 2003年05月11日
学习!!
回复 点赞
发动态
发帖子
硬件/系统
创建于2007-09-28

2260

社区成员

1.7w+

社区内容

VC/MFC 硬件/系统
社区公告
暂无公告