.NET COm Interop in IE?

Discussion in 'ASP .Net' started by super todd, Jul 19, 2007.

  1. super todd

    super todd Guest

    Im trying to package two dll files to be used as a web control.
    Im using a C# class that is exposed through com interop that I
    created in Visual studio 2005 to add some business functionality.
    That depends on a third-party dll: MAPI33.dll http:/
    www.mapi33.adexsolutions.com.I'm trying to package them to be embedded
    in my webpage to be used with javascript like so:<Html>


    <Script Language="javascript" defer="true">

    var outlook = new ActiveXObject("Net.Em.Outlook");
    //do something with object

    </Script>
    <Body>

    <OBJECT id="test" CLASSID="CLSID:
    81C599FB-9C61-4ae6-8866-22397D8D6FA4"
    CODEBASE="emoutlook.cab#version=1,0,0,0">
    </OBJECT>
    </Body>
    </html>


    Here is the inf file I've created to install the dll's on the
    client: [version]
    signature="$CHICAGO$"
    AdvancedINF=2.0
    [Add.Code]
    emoutlook.dll=emoutlook.dll
    MAPI33.dll=MAPI33.dll
    [MAPI33.dll]
    FileVersion=4,5,2709,24579
    file-win32-x86=thiscab
    RegisterServer=yes
    [emoutlook.dll]
    FileVersion=1,0,0,0
    file-win32-x86=thiscab
    RegisterServer=yes I've packaged the dll's along with the inf
    file in a cab using cabarc.exe cabarc N emoutlook.cab
    emoutlook.inf emoutlook.dll MAPI33.dll I've adjusted all my IE
    setttings to allow download and installation of an unsigned activex
    object, like: download unsigned activex controls: Enable
    initialize and script activex controls marked as unsafe: Enable
    etc, etc... When I browse my page, IE prompts me to download and
    install emoutlook.cab. Using fiddler I see that it does in fact
    download the cab. I can go to Tools > Manage Add-ons and see the
    entry for Net.em.Outlook, It's type is activex control, and I see that
    it is enabled as well. One thing I find odd is that the file
    associated with it is mscoree.dll, not either of the dlls in the
    cab. I get the following javascript error: "automation server can't
    create object"at the line: var outlook = new
    ActiveXObject("Net.Em.Outlook");
     
    super todd, Jul 19, 2007
    #1
    1. Advertising

  2. super todd

    bruce barker Guest

    because is not signed, nor marked safe for scripting, the browser will
    not load it. change your browser security setting to fully trust your
    web site.

    -- bruce (sqlwork.com)

    super todd wrote:
    > Im trying to package two dll files to be used as a web control.
    > Im using a C# class that is exposed through com interop that I
    > created in Visual studio 2005 to add some business functionality.
    > That depends on a third-party dll: MAPI33.dll http:/
    > www.mapi33.adexsolutions.com.I'm trying to package them to be embedded
    > in my webpage to be used with javascript like so:<Html>
    >
    >
    > <Script Language="javascript" defer="true">
    >
    > var outlook = new ActiveXObject("Net.Em.Outlook");
    > //do something with object
    >
    > </Script>
    > <Body>
    >
    > <OBJECT id="test" CLASSID="CLSID:
    > 81C599FB-9C61-4ae6-8866-22397D8D6FA4"
    > CODEBASE="emoutlook.cab#version=1,0,0,0">
    > </OBJECT>
    > </Body>
    > </html>
    >
    >
    > Here is the inf file I've created to install the dll's on the
    > client: [version]
    > signature="$CHICAGO$"
    > AdvancedINF=2.0
    > [Add.Code]
    > emoutlook.dll=emoutlook.dll
    > MAPI33.dll=MAPI33.dll
    > [MAPI33.dll]
    > FileVersion=4,5,2709,24579
    > file-win32-x86=thiscab
    > RegisterServer=yes
    > [emoutlook.dll]
    > FileVersion=1,0,0,0
    > file-win32-x86=thiscab
    > RegisterServer=yes I've packaged the dll's along with the inf
    > file in a cab using cabarc.exe cabarc N emoutlook.cab
    > emoutlook.inf emoutlook.dll MAPI33.dll I've adjusted all my IE
    > setttings to allow download and installation of an unsigned activex
    > object, like: download unsigned activex controls: Enable
    > initialize and script activex controls marked as unsafe: Enable
    > etc, etc... When I browse my page, IE prompts me to download and
    > install emoutlook.cab. Using fiddler I see that it does in fact
    > download the cab. I can go to Tools > Manage Add-ons and see the
    > entry for Net.em.Outlook, It's type is activex control, and I see that
    > it is enabled as well. One thing I find odd is that the file
    > associated with it is mscoree.dll, not either of the dlls in the
    > cab. I get the following javascript error: "automation server can't
    > create object"at the line: var outlook = new
    > ActiveXObject("Net.Em.Outlook");
    >
     
    bruce barker, Jul 20, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Barlow

    COM interop from ASP.NET

    Stefan Barlow, Aug 4, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    474
    Stefan Barlow
    Aug 4, 2003
  2. Lars-Erik Aabech
    Replies:
    14
    Views:
    9,103
    hmkjr
    Jul 10, 2009
  3. Patrick
    Replies:
    2
    Views:
    671
    Steven Cheng[MSFT]
    Oct 1, 2004
  4. Kristof Thys

    ASP.net webservice interop with c++ dll

    Kristof Thys, Sep 23, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    480
    Kristof Thys
    Sep 23, 2004
  5. =?Utf-8?B?VUtQb3N0aWU=?=

    COM Interop problem with 3rd Party DLL using C# under ASP.NET

    =?Utf-8?B?VUtQb3N0aWU=?=, Sep 23, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    825
    =?Utf-8?B?VUtQb3N0aWU=?=
    Sep 23, 2004
Loading...

Share This Page