How can I create an ActiveX object with an IE instance inside of a web page?

Posted on 2007-10-02
Last Modified: 2013-11-18
Yes, it sounds weird, but I want to create an ActiveX object inside of a webpage that can host an IE session. The reason for this is we are creating a web application that will contain two other web apps inside iFrames. The problem with this is that if those web apps are loaded in the same IE session, one of them will not work. (It's a limitation of the web app, and we don't have control over it.)

We could always modify the app so that one of them runs in another browser window (this will work), but it isn't ideal. The purpose of the app we are creating is that it is a single view portal that makes navigation easier.

The only possible solution we've come up with so far is to host one of the web apps inside an ActiveX object and hope that it uses a new browser session. That will keep the instances separate, and allow them both to work (in theory). So, basically, I'm trying to find the code to create an ActiveX browser session inside another browser.

Using the InternetExplorer.Application object, I can get a page to load, but it's in a different window.  (I could do that, anyway.)  My goal is to have a "box" on the page that contains a new IE session with no toolbars or anything.
Question by:BicMan
    LVL 8

    Accepted Solution

    hi mom
    <OBJECT ID="WebBrowser1" WIDTH=640
    HEIGHT=480 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>
    LVL 8

    Expert Comment

    sorry, that 'hi mom' was from my test html, forgot to take it out when i did select all

    Author Comment

    That is exactly what I was asking for, although it didn't fix my underlying problem.  The points are yours, but do you have any other techniques that might trick the browser into loading the activeX object as a new session?  This may not be possible with IE's architecture, but I'm a naive optimist. =)
    LVL 8

    Expert Comment

    as far as i know, all IE instances on the same machine run as the same session, regardless of how they are started.

    are the 2 applications on the same server with the same dns name? if you use virtualhosting and have each application on it's own domain, it should keep the session cookies seperate.

    Author Comment

    If you start the exe again when a browser is already open, it starts a new session.  If you use "Open in new window" it creates a window on the same session.  The name of the webapps are completely different.  I have no idea where the underlying issue is.  I guess what I'm trying to do is basically impossible.  Thanks for your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Suggested Solutions

    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    Read about why website design really matters in today's demanding market.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now