[求助]┳┳求关闭端口的代码┳┳
dim port as string="80"
Dim root As DirectoryEntry = New DirectoryEntry("IIS://localhost/W3SVC")
Dim siteID As Integer = 1
Dim e As New DirectoryEntry
For Each e In root.Children
If e.SchemaClassName = "IIsWebServer" Then
Dim ID As Integer = Convert.ToInt32(e.Name)
If ID >= siteID Then
siteID = ID + 1
End If
If e.Properties("ServerBindings")(0).ToString() = ":" + port + ":" Then
''这里写关闭端口的代码---------------
End If
End If
Next
我现在循环判断端口,如果端口是80那么就关闭该端口,其他的都没什么问题,就是不知道怎么关闭,请各位大虾帮忙,小虾米在这里先谢了