G
Guest
Hi all
I has Component inside ASP.NET page that create CO
object and store reference to it in the Component's privat
static field. Then I cast this reference to desired interfac
and call interface method. All works fine.(No exception throwed
Then I push button and the same ASP.NET page initiated again
Components private static field has reference to previously create
COM object. But when I try to cast this reference to COM interfac
I get InvalidCastException 'Specified cast is not valid.
I can not understand why. May be RCW lose pointer to interfac
between requesting page. Intresting if I create COM objec
on each page loading instead of storing reference to it in th
static field all works fine. And last, all of this with static field
with reference to COM in Windows Forms app works very well
ASP.NET and COM use STA threading model
I use custom RCW to interoperate with COM
I use ASP.NET 1.
Thanks.
I has Component inside ASP.NET page that create CO
object and store reference to it in the Component's privat
static field. Then I cast this reference to desired interfac
and call interface method. All works fine.(No exception throwed
Then I push button and the same ASP.NET page initiated again
Components private static field has reference to previously create
COM object. But when I try to cast this reference to COM interfac
I get InvalidCastException 'Specified cast is not valid.
I can not understand why. May be RCW lose pointer to interfac
between requesting page. Intresting if I create COM objec
on each page loading instead of storing reference to it in th
static field all works fine. And last, all of this with static field
with reference to COM in Windows Forms app works very well
ASP.NET and COM use STA threading model
I use custom RCW to interoperate with COM
I use ASP.NET 1.
Thanks.