PortalApplication.GetContext Method (Guid, PortalZone)
NOTE: This API is now obsolete.
Gets a reference to a PortalContext object that represents the current application context for the specified GUID and portal zone.
Namespace: Microsoft.SharePoint.Portal
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Syntax
'Declaration
<ObsoleteAttribute("This class is obsolete.")> _
Public Shared Function GetContext ( _
siteId As Guid, _
zone As PortalZone _
) As PortalContext
'Usage
Dim siteId As Guid
Dim zone As PortalZone
Dim returnValue As PortalContext
returnValue = PortalApplication.GetContext(siteId, _
zone)
[ObsoleteAttribute("This class is obsolete.")]
public static PortalContext GetContext(
Guid siteId,
PortalZone zone
)
Parameters
siteId
Type: System.GuidA globally unique identifier.
zone
Type: Microsoft.SharePoint.Portal.Topology.PortalZoneA member of the PortalZone enumeration that represents the portal zone.
Return Value
Type: Microsoft.SharePoint.Portal.PortalContext
A PortalContext object that represents the current application context.
Remarks
The following table describes the exception types.
Exception Type |
Condition |
---|---|
InvalidOperationException |
The System.Web.HttpContext.Current static property is a null reference (Nothing in Visual Basic). |