Export (0) Print
Expand All

PageOnInit Method

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

public static void PageOnInit(
	HttpContext context,
	bool isPageSslSecure
)

Parameters

context
Type: System.Web..::..HttpContext
The current request context.
isPageSslSecure
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.
Show:
© 2014 Microsoft