Print Page | Close Window

gzipMessageEncoding

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=2100
Printed Date: 13-May-2026 at 12:55am


Topic: gzipMessageEncoding
Posted By: yafei
Subject: gzipMessageEncoding
Date Posted: 26-Aug-2010 at 11:47am
I got the following error message when I use the customBinding in my BOS:
The type 'IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core' registered for extension 'gzipMessageEncoding' could not be loaded. (C:\Docs\WPF\WpfApplication1\bin\Debug\WpfApplication1.vshost.exe.Config line 66)
 
I have IdeaBlade.Core.dll referenced for the runtime.
 
Server Side configuraiton ServerConsole.exe.config:
 
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core" />
  </configSections>
  <connectionStrings>
    <add name="NorthwindIBEntityManager" connectionString="metadata=res://*/NorthwindIBModel.csdl|res://*/NorthwindIBModel.ssdl|res://*/NorthwindIBModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=JAY-WS\SQLEXPRESS;Initial Catalog=NorthwindIB;User Id=localdev;Password=anotherhotday;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
 
  <ideablade.configuration version="6.00" xmlns=" http://schemas.ideablade.com/2010/IdeaBladeConfig - http://schemas.ideablade.com/2010/IdeaBladeConfig ">
 
    <logging
        logFile="DebugLog.xml"
        archiveLogs="false"
        port="9922"
        serviceName="TracePublisher"
        usesSeparateAppDomain="false" />

    <objectServer remoteBaseURL=" http://192.168.0.109 - http://192.168.0.109 "
                  serverPort="9009"
    serviceName="EntityService"
                  useDCS="true" >

      <serverSettings allowAnonymousLogin="true"
                       loginManagerRequired="false"
                       sessionEncryptionKey=""
                       supportedClientApplicationType="UseLicense"
                       testMode="false"
                       useAspNetSecurityServices="false"
                       useDTC="false"
                       userSessionTimeout="30"
                      />
    </objectServer>
    <probeAssemblyNames>
      <probeAssemblyName name="MyAssembly" />
    </probeAssemblyNames>
 
   <notificationService enabled="false" clientPort="1001" />
 
    <verifiers />
  </ideablade.configuration>
  <system.serviceModel>
    <services>
      <!--<service name="EntityService">
        <endpoint
          address=" http://localhost:9009/EntityService - http://localhost:9009/EntityService "
         binding="wsHttpBinding" bindingConfiguration="wsHttpDefault"
         contract="IdeaBlade.EntityModel.IEntityServiceContract" />
      </service>
      <service name="EntityServer">
        <endpoint
          address=" http://localhost:9009/EntityServer - http://localhost:9009/EntityServer "
         binding="wsHttpBinding" bindingConfiguration="wsHttpDefault"
         contract="IdeaBlade.EntityModel.IEntityServerContract" />
      </service>-->

      <service name="EntityService">
        <endpoint address=" http://localhost:9009/EntityService - http://localhost:9009/EntityService "
                  binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                  contract="IdeaBlade.EntityModel.IEntityServiceContract"
                  />
      </service>
      <service name="EntityServer">
        <endpoint address=" http://localhost:9009/EntityServer - http://localhost:9009/EntityServer "
                  binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                  contract="IdeaBlade.EntityModel.IEntityServerContract"
                  />
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpDefault" maxReceivedMessageSize="2147483647" />
      </wsHttpBinding>

      <customBinding>
        <binding name="compressedBinaryBinding"
                 closeTimeout="00:01:00"
                 openTimeout="00:01:00"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:01:00">
          <gzipMessageEncoding>
            <readerQuotas
              maxDepth="2147483647"
              maxStringContentLength="2147483647"
              maxArrayLength="2147483647" />
          </gzipMessageEncoding>
          <httpTransport maxReceivedMessageSize="2147483647" />
        </binding>
      </customBinding>

     
    </bindings>
    <!-- gzipMessageEncoding is used by the custom binding above to provide GZip compression. -->
    <extensions>
      <bindingElementExtensions>
        <add name="gzipMessageEncoding"
             type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>
      </bindingElementExtensions>
    </extensions>
 
  </system.serviceModel>
</configuration>
 
 
 
 
And client side WPF configuration app.config:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core"/>
</configSections>
<ideablade.configuration version="6.00" xmlns=" http://schemas.ideablade.com/2010/IdeaBladeConfig - http://schemas.ideablade.com/2010/IdeaBladeConfig ">
<logging logFile="DebugLog.xml"/>
<!--<objectServer>
<objectServer remoteBaseURL=" http://192.168.0.109 - http://192.168.0.109 " serverPort="9009" serviceName="EntityService" >
<clientSettings isDistributed="true" />
</objectServer>-->
<objectServer>
<clientSettings isDistributed="true" />
</objectServer>
<!-- Additional configuration can be added to override defaults.
See the sample config files in the Learning Resources for more information.
-->
</ideablade.configuration>
<system.serviceModel>
<client>
<!--<endpoint name="EntityService"
address=" http://192.168.0.109:9009/EntityService - http://192.168.0.109:9009/EntityService "
binding="wsHttpBinding" bindingConfiguration="wsHttpDefault"
contract="IdeaBlade.EntityModel.IEntityServiceContract"
/>
<endpoint name="EntityServer"
address=" http://192.168.0.109:9009/EntityServer - http://192.168.0.109:9009/EntityServer "
binding="wsHttpBinding" bindingConfiguration="wsHttpDefault"
contract="IdeaBlade.EntityModel.IEntityServerContract"
/>-->
<endpoint name="EntityService"
address=" http://192.168.0.109:9009/EntityService - http://192.168.0.109:9009/EntityService "
binding="customBinding" bindingConfiguration="compressedBinaryBinding"
contract="IdeaBlade.EntityModel.IEntityServiceContract"
/>
<endpoint name="EntityServer"
address=" http://192.168.0.109:9009/EntityServer - http://192.168.0.109:9009/EntityServer "
binding="customBinding" bindingConfiguration="compressedBinaryBinding"
contract="IdeaBlade.EntityModel.IEntityServerContract"
/>

</client>
<extensions>
<bindingElementExtensions>
<add name="gzipMessageEncoding"
type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>
</bindingElementExtensions>
</extensions>
<bindings>
<customBinding>
<binding name="compressedBinaryBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00">
<gzipMessageEncoding>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" />
</gzipMessageEncoding>
<httpTransport maxReceivedMessageSize="2147483647" />
</binding>
</customBinding>
<wsHttpBinding>
<!-- Standard wsHttp binding - uses Windows auth and message security by default.
To use, on the endpoint definitions above,
change the bindingConfiguration name to "wsHttpDefault"
and the binding to "wsHttpBinding". -->
<binding name="wsHttpDefault" maxReceivedMessageSize="2147483647" />
</wsHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
 
 



Replies:
Posted By: kimj
Date Posted: 26-Aug-2010 at 12:32pm
Are you getting this error message when editing the config file in Visual Studio or using the WCF Configuration Editor?  If so, then the error is innocuous, since it's just Intellisense complaining that it doesn't know that the IdeaBlade.Core assembly is in the GAC.  If you set Copy Local = true for the IdeaBlade.Core reference in your project the error may go away, since Intellisense should then find the assembly in your bin folder.


Posted By: yafei
Date Posted: 26-Aug-2010 at 12:43pm

I got this error when I ran the WPF app. When I set Copy Local = true and the error goes away. It seems that WPF app doesn't use the IdeaBlade.Core.dll properly from GAC.



Posted By: kimj
Date Posted: 26-Aug-2010 at 1:51pm
Possibly.
 
For completeness I should add that you don't really need to use the system.serviceModel configuration information in a DevForce 2010 application.  In your case since you're currently using all DevForce defaults, you could instead remove the serviceModel section from both config files and allow DevForce to programmatically determine the configuration needed based on information in the <objectServer> element.


Posted By: yafei
Date Posted: 26-Aug-2010 at 3:28pm
thank you very much.
 
Yafei



Print Page | Close Window