CrawlRule.SetCredentials 方法 (CrawlRuleAuthenticationType, StringCollection, StringCollection)
设置索引引擎爬网时使用的身份验证类型、 cookie 和错误页面内容的爬网规则适用于。
命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)
语法
声明
Public Sub SetCredentials ( _
type As CrawlRuleAuthenticationType, _
cookies As StringCollection, _
errorPages As StringCollection _
)
用法
Dim instance As CrawlRule
Dim type As CrawlRuleAuthenticationType
Dim cookies As StringCollection
Dim errorPages As StringCollection
instance.SetCredentials(type, cookies, _
errorPages)
public void SetCredentials(
CrawlRuleAuthenticationType type,
StringCollection cookies,
StringCollection errorPages
)
参数
cookies
类型:System.Collections.Specialized.StringCollection身份验证 cookie 中。
errorPages
类型:System.Collections.Specialized.StringCollection身份验证错误页。