Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

.NET COm Interop in IE?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
super todd - 19 Jul 2007 20:59 GMT
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 - 20 Jul 2007 16:09 GMT
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)

> 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
[quoted text clipped - 47 lines]
> create object"at the line:    var outlook = new
> ActiveXObject("Net.Em.Outlook");

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.