Answered Sync Framework 4.0 Windows Phone 7

  • 19 sierpnia 2011 17:25
     
     
    Are there any working VB examples for Sync 4.0 and Windows Phone 7? Something using a WCF sync service would be quite helpful.  Thanks.

Wszystkie odpowiedzi

  • 26 sierpnia 2011 00:56
    Moderator
     
     Odpowiedz
  • 1 września 2011 13:32
     
      Zawiera kod

    Thanks for the example.  I ran through it and I get the same issue I've run into when trying to create my own sync services.  I receive the following error when running the service.  Any ideas, thanks in advance.

     

    Server Error in '/' Application.

     

    The type 'ContosoScope.ContosoScopeSyncService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

     

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [InvalidOperationException: The type 'ContosoScope.ContosoScopeSyncService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.]
      System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +52042
      System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1440
      System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44
      System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615
    
    [ServiceActivationException: The service '/ContosoScopeSyncService.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'ContosoScope.ContosoScopeSyncService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found..]
      System.Runtime.AsyncResult.End(IAsyncResult result) +687598
      System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
      System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234
      System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +355
      System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
      System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75