WebSharingAppDemo-CEProviderEndToEnd Queries peerProvider for NeedsScope before any files are batche
        Posted  
        
            by Don
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Don
        
        
        
        Published on 2010-03-08T14:29:20Z
        Indexed on 
            2010/05/23
            2:40 UTC
        
        
        Read the original article
        Hit count: 587
        
I'm building an application based on the WebSharingAppDemo-CEProviderEndToEnd. When I deploy the server portion on a server, the code gives the error "The path is not valid. Check the directory for the database." during the call to NeedsScope() in the CeWebSyncService.cs file.
Obviously the server can't access the client's sdf but what is supposed to happen to make this work? The app uses batching to send the data and the batches have to be marshalled across to the temp directory but this problem is occurring before any files have been batched over. There is nothing for the server to look at to determine whether the peerProivider needs scope. What am I missing?
public bool NeedsScope()
{
    Log("NeedsSchema: {0}", this.peerProvider.Connection.ConnectionString);
    SqlCeSyncScopeProvisioning prov = new SqlCeSyncScopeProvisioning();
    return !prov.ScopeExists(this.peerProvider.ScopeName, (SqlCeConnection)this.peerProvider.Connection);
}
        © Stack Overflow or respective owner