If I can use a sync service to create a database schema and download data, why does it return a 404 when I try to upload data?
I am using sync framework in an application to synchronize data between workstations and a central server. As long as I download data from the server (create new database on local machine and download data into the new tables), everything works fine. All
subsequent download only syncs work fine. If I configure the application to do a download only sync instead of a bidirectional sync, everything works fine. However, if I try to switch over to a bidirectional sync, the upload step does not work. Instead of
uploading data, my server returns a 404, even though my sync clients have been able to locate the service just fine every other time.
Here is the relevant portion of my Web.config:
<services>
<service name="Services.Services.DataCacheSyncService"
behaviorConfiguration="default">
<endpoint binding="wsHttpBinding"
contract="Synchronization.Services.Contracts.IDataCacheSyncContract" />
</service>
</services>
Here is the SVC file used to access the service:
<%@ ServiceHost Service="Services.Services.DataCacheSyncService" %>
And here are my data contracts:
[ServiceContract]
public interface IDataCacheSyncContract : IDataCacheUploadContract, IDataCacheDownloadContract
{
}
[ServiceContract]
public interface IDataCacheUploadContract : IDataCacheContract
{
[FaultContract(typeof(string))]
[OperationContract]
SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession);
}
[ServiceContract]
public interface IDataCacheDownloadContract : IDataCacheContract
{
[FaultContract(typeof(string))]
[OperationContract]
SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession);
}
[ServiceContract]
public interface IDataCacheContract
{
[OperationContract]
SyncSchema GetSchema(IEnumerable<string> tableNames, SyncSession syncSession);
[OperationContract]
SyncServerInfo GetServerInfo(SyncSession syncSession);
}