|
|
Hi Gary I am developing an application using Visual Studio LightSwitch. In there I have an requirement to sync local SQL Express Database to Remote SQL Server or SQL Azure Database. Is this possible by using Microsoft Sync Framework? If yes then how? If you can develop a sample lightswitch application with Microsoft Sync Framework Integration then I will be really grateful to you. Thank You Rashmi
I have the sample working in VS2010 but the peer databases are being created on the main server. How can I create and sync using clients (i.e. peer-to-peer). Thanks
Just a minor comment and I know it's a simple thing to do myself however you should provide a Visual Studio 2010 version of the solution.
Hi Jeff Did you get the sample working in visual studio 2010? Could you please send me tips on how to get the sample working? Thank you Attie
I was able to get it to work in Visual Studio 2010 just fine with a few modifications. As soon as the port from 08 to 10 is finished you will need to do a few things. First, make sure you have the latest SYNC services framework,SDK and Redistributables installed. Install the SQL files it comes with. Next I had to change each of the projects to .Net 4.0 and X64. You may not need to change to x64 but you will be required to update to 4.0 or 3.5(havent tested 3.5) at the least. WHen you port it leaves it in 2.0 framework which causes errors. If you don't have the latest SYNC framework you will also get errors, about 6 of them including the .EXE can't find error due to the WebSyncContract project not building. You will then need to delete the references (if it doesn't build and you get RelationalSyncP rovider,SqlSync Provider or other errors and re-add those references making sure you reference the correct DLL's. I went into programs and deleted all previous versions of the sync framework due to issues of it still some how referencing 1.0 sync service. You should be able to build now. It's a pretty easy port from 08 to 10 with the only major errors being descrivbed above with framework versions. Cheers
Hi,
I have added wcf as reference on my project and everything is fine. when i converted it as service reference ( removed the proxy classes in the code because i used VS to auto generate the proxy class)
I'm looking for a way to get the wcf sqlsyncProvider :
have create:
[DataContract]
[KnownType(type of(KnowledgeSyn cProvider))]
public class GetSqlSyncProvi der
{
[DataMember]
public object PeerProvider;
}
Client Side:
GetSqlSyncProvi der prov = webSyncService. GetSyncProvider (SyncUtils.Scop eName, SyncUtils.destC onnStr);
SyncOperationSt atistics stats = synchronization Helper.Synchron izeProviders(sr cProvider, prov);
I have got serialization exception:
System.Net.WebE xception: The underlying connection was closed: An unexpected error occurred on a receive.
any suggestion? thanx
I've tried this sample code and it works. The db peer are synchrozined. but when I try to test the service with WCF test client, i receive the following error : http://localhost:8000/WebSyncC ontract/SqlWebS yncService/mex Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata. c:\Users\stepha ne\AppData\Loca l\Temp\Test Client Projects\10.0\5 77cd186-2140-46 6f-a121-7d31ef3 ea35d\Client.cs (1277,13) : error CS0246: The type or namespace name 'schema' could not be found (are you missing a using directive or an assembly reference?) c:\Users\stepha ne\AppData\Loca l\Temp\Test Client Projects\10.0\5 77cd186-2140-46 6f-a121-7d31ef3 ea35d\Client.cs (1283,12) : error CS0246: The type or namespace name 'schema' could not be found (are you missing a using directive or an assembly reference?) Any idea ?
thanks to vishalvatsal post in another forum, I removed the line "[ServiceKnownType(typeof(Sync IdFormatGroup)) ]" in namespace WebSyncContract and it solved my problem
Hmmm. But then have you gone back and tried to run without debugging? You may find you need that line else you'll get an"System.ServiceModel.Communi cationException : There was an error while trying to serialize parameter http://tempuri. org/:sourceChan ges" exception thrown. For some reason though, the app. still seemed to work for me in debug mode even though WCF Test Client said it couldn't add the service.
In this app, interfaces are there... but where is the service file; it has to be added to the service reference or not? Do help me... Thanx in advance!
I am getting the following error on building the app... Error 7 Could not load referenced assembly "D:\Giftson\Sample\Downloads\D atabase SyncSQL Server and SQL Express N-Tier with WCF\C#\WebSyncC ontract\WebSync Contract\bin\De bug\WebSyncCont ract.exe". Caught a FileNotFoundExc eption saying "Could not load file or assembly 'D:\Giftson\Sam ple\Downloads\D atabase SyncSQL Server and SQL Express N-Tier with WCF\C#\WebSyncC ontract\WebSync Contract\bin\De bug\WebSyncCont ract.exe' or one of its dependencies. The system cannot find the file specified.". D:\Giftson\Samp le\Downloads\Da tabase SyncSQL Server and SQL Express N-Tier with WCF\C#\ResGen WebSharingAppDe mo-SqlProviderE ndToEnd
In your testing project, WebSyncContract must be added as reference
Hi spillsome, Thanx for ur reply. Actually, after i download this app, i donot find WebSyncContract.exe file inside the debug folder to add the reference... What i have to do? can u mail that file?
You need to build the WebSyncContract project. It is the Web service.
fine... I removed and added the references - Microsoft.Synchronization. It is executing and got the output.
I had this issue, I have a 64bits machine. I selected the CommonUtils project right click>properties>Build> then change the platform to 64 bit Then in the WebSynContract project the same process and it works. Remember to configure the database with the sample scrits and change the sql server instance if it is different of your machine name. Hope helps
I haven't changed much of this code. The service's running in http://localhost:8000/Relation alSyncContract/ SqlSyncService/ I can see peer1's tables but when i try to synchronize with another database, i get the following error: There was no endpoint listening at http://localhos t:8080/Relation alSyncContract/ SqlSyncService/ that could accept the message. This is often caused by an incorrect address or SOAP action in line 57 of RelationalProvi derProxy.cs
I got the same problem with I try to sync a table with large amount of data (70k records). It's OK when the amount of data is small (in hundreds)
I have tried this sample and getting exactly same error as mentioned by spillsome below. Can someone/creator of the sample please provide some solution?
Has anyone stripped out the Peer to Peer side of WCF sync and just got a sample showing server/client syncing over WCF?
Hi HarjS, I am also trying to find exactly what you are after. Did you get any break through with it?
Hi friends. I was trying convert WebSyncContract to work over IIS 7.0 but i had many, many troubles. Anyone had any sample or tip to help me???