Prevent the Internet Explorer Cross-Domain Security Dialog Box - Greg Collins
in

InfoPath Dev

This Blog

Syndication

Greg Collins

Prevent the Internet Explorer Cross-Domain Security Dialog Box

With default settings, Internet Explorer might warn you when your InfoPath form attempts to access data across domains (see Figure 1). Notice that the title bar is labeled as "Internet Explorer"; this is because Internet Explorer, and not InfoPath, is posing the security risk. Although this is beneficial for security purposes, if you are working in a controlled environment this dialog box can become annoying.


Figure 1. The Internet Explorer cross-domain data access security risk dialog box.

For example, the first time you use either the New or NewFromSolutionWithData methods you will be presented with the security warning dialog box shown in Figure 1. If you click Yes, the method will proceed as expected. If you click No, you will receive an error dialog box informing you that permission was denied, and the method will fail. This warning dialog box is only presented once during the life of your form. Thereafter your choice will be reused by default. To select a new choice you will need to close and reopen your form.

This dialog box might not appear if you publish your form to a Web server. You can prevent this dialog box by setting your form template to full trust or you can disable it.

In this task we will disable the Internet Explorer security risk dialog box by modifying your Internet Explorer security settings. This will prevent this dialog box from appearing only on the specific machine with the modified settings.

Disable the Internet Explorer security risk dialog box:

  1. From Internet Explorer, choose Internet Options from the Tools menu.
  2. On the Security tab of the Internet Options dialog box, select the Local Intranet Web Content Zone and then click Custom Level.
  3. Locate the Miscellaneous/Access Data Sources Across Domains setting, and then select Enable, as shown in Figure 2.
  4. Click OK, and then click Yes to the warning dialog box that appears.
  5. Click OK to close the Internet Options dialog box.


Figure 2. Enabling cross-domain data access in Internet Explorer.

These Internet Explorer security options are per machine settings. If you choose to use this solution as part of deployment, you will need to follow the above steps on each machine that will be using your form.

©2005 Greg Collins. All rights reserved. Licensed to Autonomy Systems, LLC for display on InfoPathDev.com.

Comments

 

How to disable Internet Explorer warning | keyongtech said:

Pingback from  How to disable Internet Explorer warning | keyongtech

January 18, 2009 8:35 AM
 

Internet Explorer Script Error - Articulate Community Forums said:

Pingback from  Internet Explorer Script Error - Articulate Community Forums

November 17, 2009 12:41 PM
 

How To Fix Dialog Error Expected A Box Option in Windows said:

Pingback from  How To Fix Dialog Error Expected A Box Option in Windows

January 20, 2015 5:09 PM
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.