PageOnPreLoad Method (HttpContext, Boolean, Guid)
Ensures that the person is logged on if logOnRequired is true.Namespace: Microsoft.Health.Web
Assembly: Microsoft.Health.Web (in Microsoft.Health.Web.dll) Version: 220.127.116.11 (1.15.1003.9505)
public static PersonInfo PageOnPreLoad( HttpContext context, bool logOnRequired, Guid appId )
- Type: System.Web..::..HttpContext
The current request context.
- Type: System..::..Boolean
True if the requested page requires the user to be logged on to HealthVault, or false otherwise. If true and the user isn't logged on, the user's browser will be automatically redirected to the HealthVault authentication page.
- Type: System..::..Guid
The unique application identifier.
It is recommended that HealthVault applications that cannot derive from HealthServicePage call this method during their pages OnPreLoad. This method will ensure that the HealthVault token is extracted from the URL query string, the authenticated person's PersonInfo is retrieved and stored in a cookie. This will make the person's information available through the cookie on all future requests until they log off.