Solved, see comments!
I have a simple .NET DLL written in c#.
In asp-classic or VB.NET i can create the object and call a member function in the DLL without any problem.
But, and this is my stumbling point, i can't access class properties.
Here's the sample code:
[Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(IComEvents))]
public class Com : IComInterface
{
public string MyProperty{ get; set; } // <-- NOT ACCESSIBLE
public void MyFunction() // <-- ACCESSIBLE
{
}
}
Here's the server-side script:
Set com = Server.CreateObject("ns.Com") // WORKS
com.MyProperty = "abc" // GIVES ERROR
com.MyFunction // WORKS
I get the following error-message:
Microsoft VBScript Runtime Error "800a01b6'
Object Doesn't Support This Property or Method: MyProperty
Can anybody tell me, why i can call the function 'MyFunciton', but if i want to set the property-value, i get the error above?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…