Attempting to consume CSLA 4.1 business object via web services and receiving the following exception (constructors were made public):
System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS0200: Property or indexer 'Csla.Rules.BrokenRule.RuleName' cannot be assigned to -- it is read only error CS0200: Property or indexer 'Csla.Rules.BrokenRule.Description' cannot be assigned to -- it is read only error CS0200: Property or indexer 'Csla.Rules.BrokenRule.Property' cannot be assigned to -- it is read only error CS0200: Property or indexer 'Csla.Rules.BrokenRule.Severity' cannot be assigned to -- it is read only at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type) at System.Web.Services.Protocols.XmlReturn.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.XmlReturnWriter.GetInitializers(LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.MimeFormatter.GetInitializers(Type type, LogicalMethodInfo[] methodInfos) at System.Web.Services.Protocols.HttpServerType..ctor(Type type) at System.Web.Services.Protocols.HttpServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
This is because CSLA objects aren't serializable using the XmlSerializer or DCS:
Copyright (c) Marimer LLC