Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: COM+ IvalidCastException


Message #1 by "Kevin Bilbee" <kbilbee@s...> on Thu, 20 Mar 2003 23:11:00
I am having an issue with COM+ on win2k. I have made other posts while
trying to figure this one out.

When I create an object and then try to cast it into the strong type
required I get an InvalidCastException. When I run the same code against
"localhost" it works great, no invalid cast exception.

object objConn = new object();
jConnection jConn = new OBjEX.jConnectionClass();
objConn =
Microsoft.VisualBasic.Interaction.CreateObject("OBjEX.jConnectObject.33",
"jbase");
// The next line causes the invalid cast exception
jConn = (OBjEX.jConnection)objConn;


This same code runs great using Windows.Forms.

Kevin Bilbee



  Return to Index