J
Jim Bancroft
Hi everyone,
I have a toy class that inherits from ServicedComponent and a
hand-crafted interface. It looks like this:
[Transaction(TransactionOption.Supported)]
public class myclass: ServicedComponent, IReadData //IReadData is the
hand-blown interface
{
public string GetString()
{
return "hello";
}
[AutoComplete]
public string GetData(string strParameters)
{
return "goodbye";
}
}
}
I've put this into a COM+ package, using regsvcs.exe, and made the package
as "open" as possible-- no security access checks, for instance. It's
running as a server application under COM+.
Here's the trouble: calling the class's GetData() method in a console app
works fine, but the same call from an ASP.Net page gives an error that says:
"System.InvalidCastException: QueryInterface for interface
Interfaces.IReadData failed."
Here's my definition of the IReadData interface-- it's simple enough:
public interface IReadData
{
{
string GetData(string strParameters);
}
}
Am I doing something wrong here that I can't see? Are you allowed to
inherit from interfaces at the same time as ServicedComponent, or are there
restrictions regarding this I don't know about? Or, is there something else
entirely at work? I'm scratching my head as to why this is happening.
Thanks for any and all help.
-Jim
I have a toy class that inherits from ServicedComponent and a
hand-crafted interface. It looks like this:
[Transaction(TransactionOption.Supported)]
public class myclass: ServicedComponent, IReadData //IReadData is the
hand-blown interface
{
public string GetString()
{
return "hello";
}
[AutoComplete]
public string GetData(string strParameters)
{
return "goodbye";
}
}
}
I've put this into a COM+ package, using regsvcs.exe, and made the package
as "open" as possible-- no security access checks, for instance. It's
running as a server application under COM+.
Here's the trouble: calling the class's GetData() method in a console app
works fine, but the same call from an ASP.Net page gives an error that says:
"System.InvalidCastException: QueryInterface for interface
Interfaces.IReadData failed."
Here's my definition of the IReadData interface-- it's simple enough:
public interface IReadData
{
{
string GetData(string strParameters);
}
}
Am I doing something wrong here that I can't see? Are you allowed to
inherit from interfaces at the same time as ServicedComponent, or are there
restrictions regarding this I don't know about? Or, is there something else
entirely at work? I'm scratching my head as to why this is happening.
Thanks for any and all help.
-Jim