-
Notifications
You must be signed in to change notification settings - Fork 314
/
sample4.vb
22 lines (18 loc) · 989 Bytes
/
sample4.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Imports System
Imports System.Text
Imports Microsoft.Web.Administration
Module Sample
Sub Main()
Dim serverManager As ServerManager = New ServerManager
Dim config As Configuration = serverManager.GetApplicationHostConfiguration
Dim sitesSection As ConfigurationSection = config.GetSection("system.applicationHost/sites")
Dim siteDefaultsElement As ConfigurationElement = sitesSection.GetChildElement("siteDefaults")
Dim ftpServerElement As ConfigurationElement = siteDefaultsElement.GetChildElement("ftpServer")
Dim securityElement As ConfigurationElement = ftpServerElement.GetChildElement("security")
Dim sslElement As ConfigurationElement = securityElement.GetChildElement("ssl")
sslElement("controlChannelPolicy") = "SslAllow"
sslElement("dataChannelPolicy") = "SslAllow"
sslElement("serverCertHash") = "57686f6120447564652c2049495320526f636b73"
serverManager.CommitChanges()
End Sub
End Module