Domain problems when hosting webbrowser with ATL 
Author Message
 Domain problems when hosting webbrowser with ATL

I'm having problems with hosting the webbrowser control in my WTL

If I change the IE security setting for 'Navigate sub-frames across
different domains' (see below) to 'Disable', all links that have a
target=_self, etc. stop working. I don't get a BeforeNavigate2 even as

For example, loading up http://www.*-*-*.com/ and clicking on any of
the links doesn't navigate to the url being clicked upon (they set
<base href= http://www.*-*-*.com/ ; in the page). Changing
the setting to be 'Prompt' brings up a warning box from the control.
It seems that the original URL is loaded in an empty domain.

If I create a test application using MFC (or Delphi) however, it works
fine and I get no prompts. An ATL activex control (web control) or a
C#/VB.NET application also have the same problems. This happens on
Win2k and XP Pro using Do I need to implement some interface
that MFC is implementing by default?

Anyone run into this problem and worked around it?

thanks in advance,


To duplicate this problem, create a WTL application (or activex web
control) using the wizard and change the initial page to be
http://www.*-*-*.com/ . Then change the IE settings for 'Navigate
sub-frames across different domains' to be 'Prompt' (below) and click
on any of the links on the page of the sample app. You'll then get a
prompt asking 'Allow sub-frames to navigate across different domains'.
If you repeat this using a MFC app instead, you will not get any
prompt and IE will navigate to the URL.

To set the IE flag: 'Navigate sub-frames across different domains'

Click Start, point to Settings, click Control Panel, and then
double-click Internet.
Click the Security tab.
Under "Select a Web content zone to specify its security settings,"
click Internet.
Click Custom Level.
Under "Navigate sub-frames across different domains," click Disable.
Click OK.

Sun, 22 May 2005 12:38:21 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Hosting the WebBrowser Control using Visual C++/ATL does not work

2. Hosting WebBrowser inside ATL COM dll - Part 2

3. Hosting WebBrowser inside an ATL COM dll

4. Hosting WebBrowser control in ATL CAxWindow

5. Hosting WebBrowser control problem.

6. Hosting ActiveX with ATL problem

7. Problem Hosting ActiveX Controls Using ATL AXHost (CAxWindow2) using VC7

8. ATL ActiveX hosting (ATL Compisite Control)

9. Tabs does not work in webbrowser control hosted by CAxWindow in CAxDialogImpl

10. Hosting a WebBrowser Control inside an activeX ?

11. External events in hosted WebBrowser

12. Hosting ATL control in ATL app


Powered by phpBB® Forum Software