I wrote a Web service in ASP.NET using Microsoft Sync Framework 2.1 and SQL CE 3.5 SP2.
On development system (Win7) everything works fine.
After publishing on a server with Win2k8 R2 Web synchronization throws an error : System.UnauthorizedAccessException because it can’t
access :
"HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server Compact Edition\v3.5"
Stacktrace:
Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
Microsoft.Synchronization.Data.SqlServerCe.SqlCeSyncUtil.CreateMachineID()
Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.CreateSyncSubscription(Guid serverId)
Microsoft.Synchronization.Data.SqlServerCe.SqlCeClientSyncProvider.get_ClientId()
Microsoft.Synchronization.SyncAgent.GetClientInfo()
Microsoft.Synchronization.SyncAgent.DataSynchronize()
How can I fix that problem without running into security issues?
Thx
set the ClientId property on the client provider (SqlCeClientSyncProvider) in your client application.