COM object in asp.net

Discussion in 'Software' started by fluoronator, Mar 4, 2008.

  1. fluoronator

    fluoronator

    Joined:
    Mar 4, 2008
    Messages:
    2
    I have an ActiveX OCX that I'd like to use on the server side, IIS, ASP.NET 2.x. It's a simple control, Just three properties and 4 methods. I've added the reference in VWD and it's created a wrapper called Interop.MyDLL.MyControl and placed a DLL called Interop.MyDLL.dll in the BIN folder on IIS. I then put a button and a textbox on my page... in the button's click event I added (using VB)...

    Dim MyNewControl As New MyDLL.MyControl
    MyTextBox.Text = MyNewControl.MyProperty


    opening the page in the browser and clicking the button I get...
    System.Runtime.InteropServices.COMException (0x8000FFFF):
    Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED) at System.RuntimeType.ForwardCallToInokeMember(String memberName, BindingFlags flags, Object target, int32[] aWrapperTypes, MessageData& msgData) at MyDLL.MyControlClass.get_MyProperty()...


    Hum...
     
    fluoronator, Mar 4, 2008
    #1
    1. Advertising

  2. fluoronator

    fluoronator

    Joined:
    Mar 4, 2008
    Messages:
    2
    This problem has been resolved... sort of. A little Googling proved that using an OCX in .NET without a graphic container is impossible for ME and probably pretty difficult for someone of average intellengence! As a work-around (this will come in handy again someday) I created an ActiveX Dll in VB6, placed the OCX on an invisible form and exposed the methods/Properties. Instead of referenceing the OCX from ASP.NET, I referenced this DLL instead. I'm still trying to get over the fact that it WORKED!!!
     
    fluoronator, Mar 4, 2008
    #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. =?Utf-8?B?c2FuanU=?=

    information about asp ,oracle,asp.net certification?

    =?Utf-8?B?c2FuanU=?=, May 18, 2005, in forum: Microsoft Certification
    Replies:
    1
    Views:
    635
    Bob Christian
    May 18, 2005
  2. Zabron Muyambo

    Easy Moving from ASP to ASP.NET???

    Zabron Muyambo, Oct 26, 2004, in forum: MCSD
    Replies:
    7
    Views:
    527
    Zabron Muyambo
    Oct 27, 2004
  3. Do
    Replies:
    0
    Views:
    443
  4. thehobbit
    Replies:
    0
    Views:
    3,847
    thehobbit
    Nov 22, 2006
  5. london1919
    Replies:
    1
    Views:
    3,019
    Lawrence Garvin \(MVP\)
    Dec 8, 2008
Loading...

Share This Page