Compartilhar via


SPIisWebServiceApplication.UnprovisionLocal Method

Unprovisions the service application on the local computer.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Protected Overrides Sub UnprovisionLocal ( _
    serviceInstance As SPServiceInstance _
)
'Usage
Dim serviceInstance As SPServiceInstance

Me.UnprovisionLocal(serviceInstance)
protected override void UnprovisionLocal(
    SPServiceInstance serviceInstance
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

serviceInstance is a null reference (Nothing in Visual Basic).

Remarks

This method removes the application from the local machine. The Service Application Framework Sample requires two methods to both provision and un-provision the service application and its instance. These methods will be called from the UI when an administrator creates or stop a service application instance.

public override void Provision()        {            m_Database.Provision();            base.Provision();        }        public override void Unprovision(            bool deleteData)        {            base.Unprovision(deleteData);            m_Database.Unprovision();        }
Public Overrides Sub Provision()
    m_Database.Provision()
    MyBase.Provision()
End Sub
Public Overrides Sub Unprovision(ByVal deleteData As Boolean)
    MyBase.Unprovision(deleteData)
    m_Database.Unprovision()
End Sub

See Also

Reference

SPIisWebServiceApplication Class

SPIisWebServiceApplication Members

Microsoft.SharePoint.Administration Namespace