WCF Azure Silverlight Chat

This sample creates a WCF chat service and builds a Silverlight client for it; both service and client are then hosted in the Azure fabric. The sevice is built using the PollingDuplexBindingElement which allows the service to push information to the client.

 
 
 
 
 
(0)
6,606 times
Add to favorites
5/4/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Need Help
    3 Posts | Last post June 22, 2012
    • Hello
      I'm trying to run the sample.
      I have 2 errors :
      
      [ServiceActivationException: Le service '/SilverlightChat/PubSubService.svc' ne peut pas être activé en raison d'une exception lors de la compilation. Le message de l'exception est : La vérification des portes mémoire a échoué car la mémoire libre (144654336 octets) est inférieure à 5% de la mémoire totale. Par conséquent, le service ne sera pas disponible pour les demandes entrantes. Pour résoudre ce problème, réduisez la charge de la machine ou ajustez la valeur de minFreeMemoryPercentageToActivateService sur l'élément de configuration serviceHostingEnvironment..]
         System.Runtime.AsyncResult.End(IAsyncResult result) +688590
         System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
         System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +310694
         System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +94
      
      [InsufficientMemoryException: La vérification des portes mémoire a échoué car la mémoire libre (144654336 octets) est inférieure à 5% de la mémoire totale. Par conséquent, le service ne sera pas disponible pour les demandes entrantes. Pour résoudre ce problème, réduisez la charge de la machine ou ajustez la valeur de minFreeMemoryPercentageToActivateService sur l'élément de configuration serviceHostingEnvironment.]
         System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage) +50919
         System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +640
      
      Someone have an idea ?
      Thanks
    • I no longer work for Microsoft, this sample is probably outdated. However, as the error says: Pour résoudre ce problème, réduisez la charge de la machine ou ajustez la valeur de minFreeMemoryPercentageToActivateService sur l'élément de configuration serviceHostingEnvironment..]
    • Hi,
      
      It is quite simple, just google for the code you will get some working example.
      
      You can check my working example(WPF, WCF and Silverlight 5) here:
      http://iconnect.arshdeep-virdi.com/web/
      
      Thanks,
      Arshdeep Virdi
  • share messages bw uses
    1 Posts | Last post June 12, 2011
    • when i deploy the application in c# code, there're some problem of compiling, also i ask if we can share messages bw uses 
  • How about a WPF Client too?
    2 Posts | Last post April 15, 2011
    • I've been looking into Windows Azure and one of the samples in the Training Kit provides a Chat Service and a WPF Client. Yours provides a Silverlight solution to the same "problem". However I wanted to create a Chat Service that could support both a WPF Client AND a Silverlight Client.
      How could I go about this? Should I create a Worker Role that would contain two endpoints (one for TCP -> WPF and one for HTTP (Duplex) -> Silverlight) or should I maybe create an Worker Role for the TCP component and a WebRole with Duplex that would communicate with an internal endpoint in the Worker Role?
      Maybe there's a simple solution this, but some pointers would be most helpful...
    • In the service implementation note: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)]
      
      What's important here is InstanceContextMode.Single which means that one instance of this class is always being called regardless of how many endpoints are used/bindings/etc. So yes, you can expose the service on multiple endpoints.