CSLA .NET

From Rockford Lhotka's Expert C# 2005 and VB 2005 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

WCF - GZip Compression & wsHttpBinding

Last post 07-09-2008, 5:00 AM by JoOfMetL. 0 replies.
Sort Posts: Previous Next
  •  07-09-2008, 5:00 AM 24611

    WCF - GZip Compression & wsHttpBinding


    Hi, I use WCF Like PTWcfService in ProjectTracker.

    <system.serviceModel>
        <services>
          <service behaviorConfiguration="PTServiceBehavior" name="PTService">       
            <endpoint address="" binding="wsHttpBinding" bindingConfiguration="UserNameWS" contract="IPTService" />

            <!-- this endpoint is used for metadata exchange -->
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:8080/PTService/" />
              </baseAddresses>
            </host>
          </service>
        </services>
       
        <bindings>
          <wsHttpBinding>
            <binding name="UserNameWS">
              <security mode="Message">
                <message clientCredentialType="UserName" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
       
        <behaviors>
          <serviceBehaviors>
            <behavior name="PTServiceBehavior">
              <serviceAuthorization principalPermissionMode="Custom">
                <authorizationPolicies>
                  <add policyType="PTWcfServiceAuth.PrincipalPolicy, PTWcfServiceAuth"/>
                </authorizationPolicies>
              </serviceAuthorization>
             
              <serviceCredentials>
                <serviceCertificate
                  findValue="localhost"
                  storeLocation="LocalMachine"
                  storeName="My"
                  x509FindType="FindBySubjectName" />
                <userNameAuthentication
                  userNamePasswordValidationMode="Custom"
                  customUserNamePasswordValidatorType="PTWcfServiceAuth.CredentialValidator, PTWcfServiceAuth" />
              </serviceCredentials>
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>




    I know the SDK gzip sample.

    But how to do, to use the Gzip Encoder with wsHttpBinding with the option :

    <binding name="UserNameWS">
              <security mode="Message">
                <message clientCredentialType="UserName" />
              </security>
            </binding>

    ?

    Thank you
View as RSS news feed in XML

Please contact Magenic for your .NET consulting and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems