这段代码用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++来写呀?
...全文
82 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
clipper_clipper 2003-05-11
  • 打赏
  • 举报
回复
学习!!

2,644

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧