locked
File Sync error with WCF RRS feed

  • Question

  • We are trying to do remote file sync with Sync and WCF and ChangeBatch is not serializable any more it was working fine in CTP1 with CTP2 we get following error any help or input would be greatly appreciated


    {"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://ektron.com/filesyncserviceTongue TiedourceChanges. The InnerException message was 'There was an error deserializing the object of type Microsoft.Synchronization.ChangeBatch. Xml representation of the object is invalid.'.  Please see InnerException for more details."}

    Monday, March 10, 2008 6:14 PM

Answers

All replies

  •  

    Ok simplified the issue to just ChangeBatch, it seems like ChangeBatch is no longer serializable over web even when it is marked as serializable. I have one simple method

     

    ChangeBatch GetChanges(ChangeBatch sourceChanges) and my serializer immediately throws the following exception

     

    The service encountered an error.

    An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
    System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior
     contract: http://ektron.com/filesyncservice:IFileSyncService ----> System.MissingMethodException: No parameterless constructor defined for this object.
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
       at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Runtime.Serialization.SchemaExporter.InvokeGetSchemaMethod(Type clrType, XmlSchemaSet schemas, XmlQualifiedName stableName)
       at System.Runtime.Serialization.SchemaExporter.ExportXmlDataContract(XmlDataContract dataContract)
       at System.Runtime.Serialization.SchemaExporter.ExportDataContract(DataContract dataContract)
       at System.Runtime.Serialization.SchemaExporter.Export()
       at System.Runtime.Serialization.XsdDataContractExporter.Export(Type type)
       at System.ServiceModel.Description.MessageContractExporter.ExportType(Type type, String partName, String operationName, XmlSchemaType& xsdType)
       at System.ServiceModel.Description.DataContractSerializerMessageContractExporter.ExportBody(Int32 messageIndex, Object state)
       at System.ServiceModel.Description.MessageContractExporter.ExportMessage(Int32 messageIndex, Object state)
       at System.ServiceModel.Description.MessageContractExporter.ExportMessageContract()
       at System.ServiceModel.Description.DataContractSerializerOperationBehavior.System.ServiceModel.Description.IWsdlExportExtension.ExportContract(WsdlExporter exporter, WsdlContractConversionContext contractContext)
       at System.ServiceModel.Description.WsdlExporter.CallExtension(WsdlContractConversionContext contractContext, IWsdlExportExtension extension)
       --- End of inner ExceptionDetail stack trace ---
       at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata()
       at System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized()
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension)
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData()
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleMetadataRequest(Message httpGetRequest, String[] queries, Message& replyMessage)
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest)
       at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.Get(Message message)
       at SyncInvokeGet(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

     

    Monday, March 10, 2008 9:14 PM
  • I am getting the same error. What are you using for remote file sync? I'm using Bryant Like's remote file sync solution. I had to update a bunch of code in order for it to work with CTP2.
    Tuesday, March 25, 2008 2:47 AM
  • Tuesday, June 17, 2008 6:23 AM