PageOnPreLoad Method (HttpContext, Boolean, Boolean)

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: (1.15.1003.9505)

static PersonInfo^ PageOnPreLoad(
	HttpContext^ context, 
	bool logOnRequired, 
	bool isMra


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..::..Boolean
Whether this application simultaneously deals with multiple records for the same person.

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.