Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes the specified HostDistributionRule from the Search service application and the collection.
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Sub RemoveRule ( _
hostName As String, _
crawlDatabaseGuid As Guid _
)
'Usage
Dim instance As HostDistributionRuleCollection
Dim hostName As String
Dim crawlDatabaseGuid As Guid
instance.RemoveRule(hostName, crawlDatabaseGuid)
public void RemoveRule(
string hostName,
Guid crawlDatabaseGuid
)
Parameters
hostName
Type: System.StringThe host name of the HostDistributionRule to remove.
crawlDatabaseGuid
Type: System.GuidThe identifier of the crawl store for the HostDistributionRule to remove.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The specified host name is null . -or- The specified host name is an empty string. -or- The specified host name exceeds 250 characters in length. -or- The specified crawl database GUID is null or empty. |
Remarks
This method uses a stored procedure to remove the rule from the search administration database. Your code should be able to handle an exception from this operation.
See Also
Reference
HostDistributionRuleCollection Class