System.Runtime.InteropServices.COMException: Operation is not allowed in this context

Discussion in 'ASP .Net' started by Dave, Jul 4, 2007.

  1. Dave

    Dave Guest

    I just thought I would ask about this error, since I have found no
    references to it on the web elsewhere.


    I have a COM object from regular ASP, written for an older app that my
    business needs to use, that I need to use in ASP.NET. The error
    occurs here:

    object obj = "test";
    String testVal = (String)obj;
    OldASPClass pickup = new OldDLL_dotnetproxy.OldASPClass();
    pickup.MyFunc(testVal, testVal, testVal);

    Somehow I ended up in a situation where it seems everything I do is
    for the first time. So just as an FYI, I am an ASP.NET newbee. Does
    anyone know what is going on here?
     
    Dave, Jul 4, 2007
    #1
    1. Advertising

  2. Dave

    Dave Guest

    On Jul 4, 4:25 pm, Dave <> wrote:
    > I just thought I would ask about this error, since I have found no
    > references to it on the web elsewhere.
    >
    > I have a COM object from regular ASP, written for an older app that my
    > business needs to use, that I need to use in ASP.NET. The error
    > occurs here:
    >
    > object obj = "test";
    > String testVal = (String)obj;
    > OldASPClass pickup = new OldDLL_dotnetproxy.OldASPClass();
    > pickup.MyFunc(testVal, testVal, testVal);
    >
    > Somehow I ended up in a situation where it seems everything I do is
    > for the first time. So just as an FYI, I am an ASP.NET newbee. Does
    > anyone know what is going on here?


    I forgot to mention that the data types in this proxy function look
    like this:

    object OldASPClass.MyFunc(object x, object y, object z)

    I'm just trying to pass the correct data types to this function to get
    this to work.
     
    Dave, Jul 4, 2007
    #2
    1. Advertising

  3. Dave

    Dave Guest

    On Jul 4, 4:46 pm, Dave <> wrote:
    > On Jul 4, 4:25 pm, Dave <> wrote:
    >
    > > I just thought I would ask about this error, since I have found no
    > > references to it on the web elsewhere.

    >
    > > I have a COM object from regular ASP, written for an older app that my
    > > business needs to use, that I need to use in ASP.NET. The error
    > > occurs here:

    >
    > > object obj = "test";
    > > String testVal = (String)obj;
    > > OldASPClass pickup = new OldDLL_dotnetproxy.OldASPClass();
    > > pickup.MyFunc(testVal, testVal, testVal);

    >
    > > Somehow I ended up in a situation where it seems everything I do is
    > > for the first time. So just as an FYI, I am an ASP.NET newbee. Does
    > > anyone know what is going on here?

    >
    > I forgot to mention that the data types in this proxy function look
    > like this:
    >
    > object OldASPClass.MyFunc(object x, object y, object z)
    >
    > I'm just trying to pass the correct data types to this function to get
    > this to work.


    FYI, I figured it out. It was an error specific to the function
    inside the DLL having to do with my input strings being formatted in a
    way it didn't like.
     
    Dave, Jul 5, 2007
    #3
    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. Mily
    Replies:
    0
    Views:
    5,126
  2. akshar108
    Replies:
    3
    Views:
    3,972
    Mark Rae [MVP]
    Sep 15, 2007
  3. rockdale
    Replies:
    0
    Views:
    891
    rockdale
    Jan 3, 2008
  4. jens
    Replies:
    0
    Views:
    327
  5. Badrinath Mohan
    Replies:
    1
    Views:
    490
    Eric Gunnerson [MS]
    Nov 10, 2003
Loading...

Share This Page