PageOnInit Method

Replicates the OnInit(EventArgs) behavior by redirecting to a secure version of the page if the URL requested is insecure and the application requires a secure connection.

Namespace: Microsoft.Health.Web
Assembly: Microsoft.Health.Web (in Microsoft.Health.Web.dll) Version: (1.15.1003.9505)

static void PageOnInit(
	HttpContext^ context, 
	bool isPageSslSecure


Type: System.Web..::..HttpContext
The current request context.
Type: System..::..Boolean
If true, the application requires all connections to this page be over a secure SSL channel.

Applications can require certain pages (or all pages) to be accessed only over a secure SSL channel. To do this the application must set the "WCPage_SSLForSecure" config value in the web.config file and pass "true" to isPageSslSecure.

If the conditions above are true the user's browser will automatically be redirected to a secure version of the page.