用VC修改IIS的属性 如设为可以匿名访问 将默认网站下的主目录路径C:\Inetpub\wwwroot 在VC程序里面可以更改成任意路径.
谢谢
谢谢
解决方案 »
- mfc菜单打钩问题
- 用VC读取系统硬件、用户、及网络设置等信息,要不要运行WMI服务?
- 用VC++6.0 打开 .vcproj文件
- 高分求网址!!急!!在线等!!!
- 一个简单的问题CListCtrl
- 很弱智的问题,小弟初学vc
- (新手)希望能够得到帮助
- 老问题:进程插入的疑问
- 求助!这段代码我想实现联合查询,单独查询都可以实现,联合就不行,请各位高手指点,急!
- 100分求教,如欲定义一宏,如:def(x),x为一整形变量, 使其代表一未知类型变量 mx (x为变量名称的一部分),即m1,m2,m3......,请教如何做,还有无更好办法,谢谢!
- 如何在程序中,设置button的visible属性
- 纯粹散分帖
net start W3SVC
Dim Computer, webSite, WebSiteID, vRoot, vDir, DirNum
On Error Resume Next
set webSite = findWeb(ComputerName, WebSiteName)
if IsObject(webSite) then
set vRoot = webSite.GetObject("IIsWebVirtualDir", "Root")
Trace "Accessing root for " & webSite.ADsPath
If (Err <> 0) Then
Display "Unable to access root for " & webSite.ADsPath
Else
DirNum = 0
If (IsArray(DirNames) = True) And (IsArray(DirPaths) = True) And (UBound(DirNames) = UBound(DirPaths)) Then
While DirNum < UBound(DirNames)
'Create the new virtual directory
Set vDir = vRoot.Create("IIsWebVirtualDir",DirNames(DirNum))
If (Err <> 0) Then
Display "Unable to create " & vRoot.ADsPath & "/" & DirNames(DirNum) &"."
Else
'Set the new virtual directory path
vDir.AccessRead = true
vDir.Path = DirPaths(DirNum)
If (Err <> 0) Then
Display "Unable to bind path " & DirPaths(DirNum) & " to " & vRootName & "/" & DirNames(DirNum) & ". Path may be invalid."
Else
'Save the changes
vDir.SetInfo
If (Err <> 0) Then
Display "Unable to save configuration for " & vRootName & "/" & DirNames(DirNum) &"."
Else
Trace "Web virtual directory " & vRootName & "/" & DirNames(DirNum) & " created successfully."
End If
End If
End If
Err = 0
DirNum = DirNum + 1
Wend
End If
End If
else
Display "Unable to find "& WebSiteName &" on "& ComputerName
End if
Trace "Done."
End Sub