We're implementing an Async server app (similar to the BatchQueue from CSLA for .NET 1.1), and it involves remoting some of my CSLA objects over to the server that handles queuing & execution, etc., but I keep getting a nasty error every time I try to submit the object via remoting.
The thing works for non-CSLA objects, but it's not playing nicely with my CSLA objects.
The error is: "Because of security restrictions, the type Csla.Validation.ValidationRules cannot be accessed." and the stack trace is included at the bottom of this message.
I found an identical post by a user named Jati on the old forums (he was also trying to set up non-IIS tcp remoting, and he was getting the same errors as me), but it looks like his issue never got fully resolved publicly on the boards. The link to that thread is: http://www.searchcsla.com/Details.aspx?msn_id=25630
Can anyone help me resolve this? I'm under a deadline, and I'm getting pretty desperate!
Stack Trace:
Server stack trace:
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord pr)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at JRN.AsyncServer.RemoteProxies.RemoteAsyncJob.Execute(JobInfo job)
at JRNField.DataOutput.ReportOutputItem.RenderAsync(Dictionary`2 outputItemParams, String deviceInfo, Int32 currentUserId, String friendlyFileName, String fileFormat, Int32 outputPackageId, Int32 fileSecurityLevel, String description) in C:\Projects\JRNField\JRNField.DataOutput\ReportOutputItem.vb:line 57
at Go_ExecuteOutputItem.ExecuteReportAsync() in C:\Projects\JRNField\JRNFieldWeb_v1_2\JRNFieldWeb_v1_2\JRNFieldWeb\Go\ExecuteOutputItem.aspx.vb:line 104
at Go_ExecuteOutputItem.Page_Load(Object sender, EventArgs e) in C:\Projects\JRNField\JRNFieldWeb_v1_2\JRNFieldWeb_v1_2\JRNFieldWeb\Go\ExecuteOutputItem.aspx.vb:line 34
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I also had problems with security exceptions when I implemented TCP-remoting with a Windows Service. I hope this helps: http://forums.lhotka.net/forums/post/2591.aspx
Copyright (c) Marimer LLC