Strangely I haven't called the delete factory in any of my previous Silverlight projects. Usually I just fetch the business object, call Delete() on the instance and Save it.
That actually works with this business object, but when I instead do the delete with a call to the Delete factory, I get an null reference exception with a message value of "Value cannot be null. Parameter name: key"
Here is the call stack (Silverlight side):
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Csla.Security.ObjectAuthorizationRules.GetRoles(Type objectType)
at Csla.Security.AuthorizationRules.GetAllowDeleteRoles(Type objectType)
at Csla.Security.AuthorizationRules.CanDeleteObject(Type objectType)
at Csla.DataPortal.Delete(Type objectType, Object criteria)
at Csla.DataPortal.Delete(Object criteria)
at Csla.Server.Hosts.Silverlight.SilverlightRequestProcessor.Delete(SilverlightCriteriaRequest request)
From the above it looks to be related to the authorization rules, but my business object has none (neither Instance nor Factory).
Is this a Bug in CSLA or am I missing something?
PS: Based on CSLA 3.8.4 and Silverlight 4.
Thanks,
Jaans
Does CSLA 4 also throw this exception when calling the Delete factory in Silverlight ?
I can confirm that this does not happen with CSLA 4.1.0 BETA.
Copyright (c) Marimer LLC