HighSecurity Property (.NET)

 

Type: Boolean

 

Returns True if the visitor is using Internet Explorer with its security settings set to High, False otherwise. For non-IE browsers HighSecurity always returns False.

 

In the rare event that a visitor enters your site with IE security settings set to High, BrowserHawk is unable to perform many of its extended property tests. In addition, this also prevents BrowserHawk from returning control back to your web page after its testing so that your page is displayed to the visitor.

 

Should this condition occur, BrowserHawk displays a message or HTML in the browser of your choosing, as determined by the HighSecurityMessage property, and includes a link for the visitor to click on to continue. When the visitor clicks on that link, your web page is then displayed.

 

You can use the results in the HighSecurity property to determine whether the visitor is running in High Security mode, and if so, you can handle this however you wish. Typically you may want to request that they add your site to their list of trusted sites.

 

Note that when HighSecurity is True, most of the BrowserHawk test results are unavailable and return their default values. Therefore you should check this property for a value of True prior to taking action on the BrowserHawk test results. Or you can use the HighSecurityLink property to have visitors running in High Security redirected to a special page to handle such cases. This is demonstrated in the examples below.

 

Note: To test these examples, you must use IE and set the Security Settings to High under the IE Tools->Internet Options menu. Be sure that you are changing the settings within the correct zone. For example if you are testing this on your local machine change the Intranet zone to High security, not the internet zone.

 

C# Example 1:

This example demonstrates how to override the default HighSecurityMessage while keeping the default HighSecurityLink setting. In this common scenario, the page that performs the BrowserHawk testing also is responsible for checking whether the user is running in High Security mode, and if so, for handling that condition within the page.

<%

ExtendedOptions options = new ExtendedOptions();

options.AddProperties("Plugin_Flash");

options.HighSecurityMessage = "This is my custom message. Click here to continue.";

ExtendedBrowserObj extBrow = BrowserObj.GetExtendedBrowser(options);

if (extBrow.HighSecurity == true) { %>

Sorry but you must add our site as a trusted site to continue. Here is how…

<% } else { %>

<!-- rest of your page goes here -->

Your Flash is: <% = extBrow.Plugin_Flash %>

<% } %> </html>

 

C# Example 2:

This example demonstrates how to use the default HighSecurityMessage while specifying a custom HighSecurityLink setting. In this scenario, the page that performs the BrowserHawk testing will NOT be called back when the visitor clicks to continue. Instead they will be linked directly to the location specified in the HighSecurityLink property.

<%

ExtendedOptions options = new ExtendedOptions();

options.AddProperties("Plugin_Flash");

options.HighSecurityLink = "http://www.yahoo.com/highsecurity.aspx?bhjs=-1";

// Note this can be set to a relative url or absolute URL as shown above.

// Note that the above URL won’t exist. You’d of course want to redirect to one of your own pages.

ExtendedBrowserObj extBrow = BrowserObj.GetExtendedBrowser(options);

%>

Since you are here we know you are not running in High Security mode.<br>

Your Flash is: <% = extBrow.Plugin_Flash %>

</html>

 

C# Example 3:

This example demonstrates how to override the default HighSecurityMessage to present a custom message in the event High Security is used by the visitor. Notice how the HighSecurityLink property is set to a blank string to keep BrowserHawk from wrapping the message in the default link. This is important because we are supplying our own link in the HighSecurityMessage and do not want another link surrounding the whole message which would be the default behavior otherwise.

 

In this scenario, the page that performs the BrowserHawk testing will NOT be called back when the visitor clicks to continue. Instead they will be linked directly to a dedicated page set up for High Security visitors.

<%

ExtendedOptions options = new ExtendedOptions();

options.AddProperties("Plugin_Flash");

options.HighSecurityMessage = "<html><body>Your fancy error page goes here. <a href='highsecurity.asp?bhjs=-1'>Now click this to continue…</a></body></html>";

// Note that the above URL won’t exist. You’d of course want to redirect to one of your own pages.

options.HighSecurityLink = null; // suppresses default behavior of wrapping the message in a link

ExtendedBrowserObj extBrow = BrowserObj.GetExtendedBrowser(options);

%>

Since you are here we know you are not running in High Security mode.<br>

Your Flash is: <% = extBrow.Plugin_Flash %>

</html>

 

Special notes for this property:

 

See Also:

HighSecurityLink Property (.NET)

HighSecurityMessage Property (.NET)