locked
Faccing problem in using microsoft sync frame work with WCF : Exception has been thrown by target of invocation RRS feed

  • Question

  • HI

    I am currenly working on microsoft sync frame work samples, synchronizing data through WCF Services, but when i click the update button on the window application to synchronise the data, i get the following exception    "Exception has been thrown by target of invocation "  and the application crashes , any one let me know what am i doing wrong,  thanks in adavnce.  Following is the code segment wriiten on the click event of the button

    // Call SyncAgent.Synchronize() to initiate the synchronization process.
          // Synchronization only updates the local database, not your project's data source.
          NorthwindDataCachSyncAgent syncAgent = new NorthwindDataCachSyncAgent();
          Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize();
          // TODO: Reload your project data source from the local database (for example, call the TableAdapter.Fill method).
          this.northwindDataSet.Employees.Merge(this.employeesTableAdapter.GetData());
    

    WCF service is in the same project as well as the desk top application,

     

    reagards,

     

     

     

    Monday, July 12, 2010 8:46 AM

Answers

All replies

  • try enabling WCF tracing so you get the exact/underlying error message.

    • Marked as answer by kingshez Tuesday, July 13, 2010 12:04 PM
    Monday, July 12, 2010 11:40 AM
  • Read this: http://social.msdn.microsoft.com/Forums/en-US/syncdevdiscussions/thread/8698a0ce-25a4-4ac7-a4fb-c9f2492010dc

    In the above link there are few things to do when doing sync in an n-tier scenario. 

    • Marked as answer by kingshez Tuesday, July 13, 2010 12:04 PM
    Monday, July 12, 2010 7:23 PM
  • I have enabled the trace and i have got the following exception :

    Exception type :

    System.ServiceModel.CommunicationException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Exception Message :

    The specified network name is no longer available. This often indicates that the HTTP client has prematurely closed the underlying TCP connection.

    i am not able to get what is going worng here, can you kindly let me know about it ?

     

     

     

     

     

    Tuesday, July 13, 2010 7:49 AM
  • can you post the wcf related entries on your config file?
    Tuesday, July 13, 2010 11:48 AM
  • Thanks june i have sort it out it was the setting in the app.config in bindings section  setting on client  which was causing the problem .

     

     

    Tuesday, July 13, 2010 12:03 PM
  • Hi Kingshez,

     

    We are experiencing the same problem there.

    Can you, please, provide us with the config that was causing the problem and what was the correction ?

     

    Thank you.


    www.Dotnet-Project.com
    Monday, June 20, 2011 8:43 AM