[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Returning user-defined types

bdb6251

6/11/2004 6:48:00 PM

Hello.
I currently have a windows form running inside a web-application.
This windows form makes a remote call to a server, which returns a
user-defined type. Here is my problem...

I can PASS user-defined objects to the server without a problem, but I
can't receive an object without the framework throwing an exception:

Parse Error, no assembly associated with Xml key
a2:http://schemas.microsoft.com/clr/nsassem/WPS.TP.Blotter/...,
Version=1.0.1623.22943, Culture=neutral, PublicKeyToken=null Test

Even stranger, if I run the windows form as a standalone application,
I CAN get return types without a problem. If anyone could help me I
would be very appreciative.

Thank you.

B. Bacon

bbacon@eplus.com
2 Answers

Sooraj PM

6/13/2004 5:29:00 AM

0

Hi

Your type must be marked as serializable when you are using it with remoting

PM Sooraj
Micorosft India Community Star


"Brian Bacon" wrote:

> Hello.
> I currently have a windows form running inside a web-application.
> This windows form makes a remote call to a server, which returns a
> user-defined type. Here is my problem...
>
> I can PASS user-defined objects to the server without a problem, but I
> can''t receive an object without the framework throwing an exception:
>
> Parse Error, no assembly associated with Xml key
> a2:http://schemas.microsoft.com/clr/nsassem/WPS.TP.Blotter/...,
> Version=1.0.1623.22943, Culture=neutral, PublicKeyToken=null Test
>
> Even stranger, if I run the windows form as a standalone application,
> I CAN get return types without a problem. If anyone could help me I
> would be very appreciative.
>
> Thank you.
>
> B. Bacon
>
> bbacon@eplus.com
>

Sunny

6/14/2004 2:39:00 PM

0

Hi,
your problem most probably is because when you use one touch deployment
(I.e. run from remote location), your app is placed in a temp folder,
but the assembly which defines the type you expect is not, or at least
the assembly loader can not find it an tries to get it from the remote
server. You may try to load it manually using AppDomain.AssemblyResolve
event handler, or you may install this assembly in the GAC.

When you run your app as a standalone, if finds the assembly in its
directory, thats why it works.

Sunny


In article <d7b2eddd.0406111047.342d953e@posting.google.com>, bdb6251
@rit.edu says...
> Hello.
> I currently have a windows form running inside a web-application.
> This windows form makes a remote call to a server, which returns a
> user-defined type. Here is my problem...
>
> I can PASS user-defined objects to the server without a problem, but I
> can''t receive an object without the framework throwing an exception:
>
> Parse Error, no assembly associated with Xml key
> a2:http://schemas.microsoft.com/clr/nsassem/WPS.TP.Blotter/...,
> Version=1.0.1623.22943, Culture=neutral, PublicKeyToken=null Test
>
> Even stranger, if I run the windows form as a standalone application,
> I CAN get return types without a problem. If anyone could help me I
> would be very appreciative.
>
> Thank you.
>
> B. Bacon
>
> bbacon@eplus.com
>