Hello Enrico, thanks for answering. My Windows forms application is a .NET
application also so I figure it would be doing the same marshalling that is
done when using COM objects from an ASP.NET application, it's all .NET
right?
I later tested with a Web application in my little network at home and it
worked well, I figure it must be just some configuration problem either in
the COM+ application or in the ASP.NET application. My network at home has
no domain controller and the settings of the COM+ application were
different, I'll try this this morning at work.
Thanks again for answering,
Jose R.
[quoted text, click to view] "enrico sabbadin @ infinito" <sabbadin@infinito_xyz.it> wrote in message
news:uTT7Ijy0DHA.4060@TK2MSFTNGP11.phx.gbl...
> looks like tehre are some issues with type library registration / interop
> assembly ..
> In windows forms it works likely because there is no marshaling taking
> place.
>
>
> "José Ramón Rodríguez" <jrrodriguez@multicorpora.ca> wrote in message
> news:Ok8Mb#wzDHA.1736@TK2MSFTNGP09.phx.gbl...
> > Hello there,
> >
> > The following code causes "Specified cast is not valid" exception when
> line
> > 3
> > executes inside an ASP.NET application. I have tried this with several
> > components. Exactly the same code works if
> > connecting locally (i.e with localhost) and it always works from a
Windows
> > Forms application even if connecting to another computer.
> >
> > Here is the code:
> >
> > Type type = Type.GetTypeFromProgID("CorporaServer.CorporaAppServer",
> > "RemoteServer");
> > Object objTest = Activator.CreateInstance(type);
> > CorporaAppServer CorporaServerObj = (CorporaAppServer)objTest; //
> exception
> > "Specified cast is not valid" raised here
> >
> > Anybody knows why this could happen? Thanks in advance,
> >
> > Jose R. Rodríguez
> >
> >
> >
> >
>
>