silverlight worked on 3.6.0 stopped on 3.6.1 (probably my fault;))

silverlight worked on 3.6.0 stopped on 3.6.1 (probably my fault;))

Old forum URL: forums.lhotka.net/forums/t/6365.aspx


davido posted on Friday, February 06, 2009

I chnaged my app which was working ok to reference the 3.6.1 assemblies and now it looks like no communication is getting to the server.

I'm finding it hard to debug it though. Any suggestions on how to find out what may be going on?

I'd like to break at WcfProxy.BeginFetch but that is run from code executing on delegate.DynamicInvoke (SynchronizedWcfProxy.RunSynchronized) and doesn't seem to hit the breakpoint or I just don't know how to make it??

davido replied on Friday, February 06, 2009

2 classes in one file; I needed to break in the generic version!

The exception is

"DataPortal.Fetch failed (The type initializer for 'FBD.FieldSalesActivity.Security.FieldSalesActivityIdentity' threw an exception.)"

coming from

"Can not register property UserId after containing type has been instantiated"

sergeyb replied on Friday, February 06, 2009

This is a new exception that was just put in to prevent incorrect code.  It means that you are registering a property in an incorrect type. If you were following Rolodex example, you would run into it.  In your inherited identity you need to specify a type for each property:

RegisterPropert<string>(typeof(FieldSalesActivityIdentity),….

 

 

 

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: davido [mailto:cslanet@lhotka.net]
Sent: Friday, February 06, 2009 3:40 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] silverlight worked on 3.6.0 stopped on 3.6.1 (probably my fault;))

 

2 classes in one file; I needed to break in the generic version!

The exception is

"DataPortal.Fetch failed (The type initializer for 'FBD.FieldSalesActivity.Security.FieldSalesActivityIdentity' threw an exception.)"

coming from

"Can not register property UserId after containing type has been instantiated"



davido replied on Friday, February 06, 2009

I don't quite follow. What would the correction look like in Rolodex ?

OR

What should this look like?

[Serializable()]

public class FieldSalesActivityIdentity : CslaIdentity

{

private static PropertyInfo<int> UserIdProperty = RegisterProperty<int>(new PropertyInfo<int>("UserId", "User Id", 0));

public int UserId

{

get

{

return GetProperty<int>(UserIdProperty);

}

}

davido replied on Friday, February 06, 2009

just noticed the overload;  working again. thanks for response.

Copyright (c) Marimer LLC