Forum Moderators: open

Message Too Old, No Replies

Class doesn't support Automation

         

MozMan

8:47 pm on Jul 6, 2005 (gmt 0)

10+ Year Member



Hi there.

I'm having a problem with an application. We've written some com objects for authenication in VB.NET, and are accessing the dll with ASP (VBScript 6).

I can access some of the object's properties with no problem; namely those that return string data. But whenever I try to access a property that returns an array, I get an error message that says, "Class doesn't support Automation" and then displays the property name.

Any idea what I'm missing or doing wrong? Any feedback appreciated.

-Moz

Easy_Coder

2:58 am on Jul 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you passing a strongly typed array from your .net object to your asp page?

I didn't think you could do that. In the com(vb6) I had to always pass back a variant array but I don't know what you would pass back from .net to vbscript.

MozMan

4:33 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



Well, I wasn't aware that .NET would allow me to NOT strongly type it... I'm guess I have to somehow return the array not as an array, but as some kind of variant; but I'm clueless how to go about that, or if it's even possible.

Any suggestions?

MozMan

5:56 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



Hey easy-

Thanks for the insight. We got it figured out.

The properties are typed as arrays, which the vbscript was choking on. So we created functions in the class that accept the the strongly typed arrays from the properties and then return them as objects, which vbscipt can understand, cuz they see objects as variants. Now I can get the data out of them in the vbscript.

Anyway, just thought I'd post this, in case anyone else runs up against the same issue. :)

Thanx again.

-Moz

Easy_Coder

11:48 pm on Jul 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



that's awesome! I can't imaging how much work actually went into system.runtime.interopservices but I'm gald I didn't have to do it.