Print Page | Close Window

Deployment Issue - Compression?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2651
Printed Date: 27-Oct-2025 at 12:23am


Topic: Deployment Issue - Compression?
Posted By: Jon S
Subject: Deployment Issue - Compression?
Date Posted: 05-May-2011 at 11:03am
We recently updated to the newest version of DevForce and we're getting the error below.  I'm assuming it has something to do with the new GZip compression in this version of DevForce?  We can run things just fine from our development environment, but when we deploy it, we get the following error:



Any ideas?




Replies:
Posted By: robertg
Date Posted: 05-May-2011 at 11:53am
Jon,

Could you provide me with some additional information on your production environment? What version of IIS are you using? What Windows is it on? Is this a stand-alone server, or is it in a cluster?

Since compression is configured within the application, are you using an app.config or ServiceReferences.ClientConfig in your SL app?  Or, are you using a serviceModel section in the web.config?

Could you verify that deployment was successful, and that both the web side and silverlight side of your application deployed to the server? If one was, but not the other, that could cause this problem.

There are a lot of things that could cause a 'not listening' error like this. For example, and probably the first thing to check, is your EntityService running? Please see: http://drc.ideablade.com/xwiki/bin/view/Documentation/deploy-entityserver - http://drc.ideablade.com/xwiki/bin/view/Documentation/deploy-entityserver

-- Robert


Posted By: robertg
Date Posted: 16-May-2011 at 1:59pm
Jon,
 
I just wanted  to follow up on this, because it's been a while and I never heard back. Did you find a resolution to your problem? If so, what was it, just so we all know?
 
Thanks,
Robert


Posted By: Jon S
Date Posted: 17-May-2011 at 7:36am
Robert,

Thanks for the follow-up.  After a call to Albert, we were able to resolve the problem.  Because we are using a custom client config, we needed to add endpoints to the EntityService and EntityServer in our .clientconfig files.  We also needed to add a ProxyEvent class like the one below:


using System.ServiceModel.Channels;
using IdeaBlade.Core.Wcf.Extensions;

public class ProxyEvents : IdeaBlade.EntityModel.ServiceProxyEvents
{

     public override void OnEndpointCreated(System.ServiceModel.Description.ServiceEndpoint endpoint)
     {
          base.OnEndpointCreated(endpoint);

          // Sample adding Gzip compression programmatically.  
          // Use when using a ServiceReferences.ClientConfig where a gzip binding cannot be added declaratively (this is a 
          // Silverlight limitation since it does not support extensions via config).

          if (endpoint.Binding is CustomBinding)
          {
               var binding = endpoint.Binding as CustomBinding;
               var elements = binding.CreateBindingElements();

               // Swap out binary/text message encoding for gzip/binary
               var encoding = elements.Find<MessageEncodingBindingElement>();
               if (encoding != null)
               {
                    elements.Remove(encoding);
               }

               encoding = new GZipMessageEncodingBindingElement();
               elements.Insert(0, encoding);
               endpoint.Binding = new CustomBinding(elements);
          }
     }
}


Posted By: robertg
Date Posted: 17-May-2011 at 10:07am
Thanks!



Print Page | Close Window