[MonoTouch] "DataMember property 'System.String Message' on type 'System.ServiceModel.ExceptionDetail' must have both getter and setter"

tomf84 ml at tomfanning.eu
Fri Dec 30 05:21:33 EST 2011


I'm an idiot. The getter for Error.Message isn't throwing that exception at
all.

The getter for UploadFileCompletedEventArgs.Result, however, is. The full
stack trace for this is below.

System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Runtime.Serialization.InvalidDataContractException: DataMember
property 'System.String Message' on type
'System.ServiceModel.ExceptionDetail' must have both getter and setter.
  at System.Runtime.Serialization.SharedContractMap.GetMembers (System.Type
type) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.SharedContractMap.Initialize () [0x00000]
in <filename unknown>:0 
  at System.Runtime.Serialization.KnownTypeCollection.RegisterContract
(System.Type type) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.KnownTypeCollection.DoTryRegister
(System.Type type) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.KnownTypeCollection.TryRegister
(System.Type type) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.KnownTypeCollection.InsertItem (Int32
index, System.Type type) [0x00000] in <filename unknown>:0 
  at System.Collections.ObjectModel.Collection`1[System.Type].Add
(System.Type item) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer.RegisterTypeAsKnown
(System.Type type) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer.PopulateTypes
(IEnumerable`1 knownTypes) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer..ctor (System.Type
type, IEnumerable`1 knownTypes) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer..ctor (System.Type
type) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request
(System.ServiceModel.Description.OperationDescription od, System.Object[]
parameters) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary
() [0x00000] in <filename unknown>:0 
  at UploadFileCompletedEventArgs.get_Result () [0x00000] in <filename
unknown>:0 
  at MyApp.MainUI.<HandleSendPressed>m__1 (System.Object s1,
.UploadFileCompletedEventArgs e1) [0x00000] in <filename unknown>:0 

Doesn't appear from the server side that the service is getting called at
all.

Tom

--
View this message in context: http://monotouch.2284126.n4.nabble.com/DataMember-property-System-String-Message-on-type-System-ServiceModel-ExceptionDetail-must-have-both-tp4245362p4245440.html
Sent from the MonoTouch mailing list archive at Nabble.com.


More information about the MonoTouch mailing list