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

D

Dave

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?
 
D

Dave

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.
 
D

Dave

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top