{"action":"created","issue":{"url":"https://api.github.com/repos/MarimerLLC/cslaforum/issues/180","repository_url":"https://api.github.com/repos/MarimerLLC/cslaforum","labels_url":"https://api.github.com/repos/MarimerLLC/cslaforum/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/MarimerLLC/cslaforum/issues/180/comments","events_url":"https://api.github.com/repos/MarimerLLC/cslaforum/issues/180/events","html_url":"https://github.com/MarimerLLC/cslaforum/issues/180","id":153464730,"number":180,"title":"WCF GZIP CustomBinding Errror","user":{"login":"MarkOverstreet","id":13034250,"avatar_url":"https://avatars.githubusercontent.com/u/13034250?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkOverstreet","html_url":"https://github.com/MarkOverstreet","followers_url":"https://api.github.com/users/MarkOverstreet/followers","following_url":"https://api.github.com/users/MarkOverstreet/following{/other_user}","gists_url":"https://api.github.com/users/MarkOverstreet/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkOverstreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkOverstreet/subscriptions","organizations_url":"https://api.github.com/users/MarkOverstreet/orgs","repos_url":"https://api.github.com/users/MarkOverstreet/repos","events_url":"https://api.github.com/users/MarkOverstreet/events{/privacy}","received_events_url":"https://api.github.com/users/MarkOverstreet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-06T14:37:21Z","updated_at":"2016-05-06T20:19:30Z","closed_at":null,"body":"I have a VS.NET 2013 (4.5.2)  app using CSLA.NET that transmits large objects and I am trying to get better performance by using compression which according to the documentation is a new feature in WCF 4.5.  So I created the seemingly simple customBindings on both the client and server as seen below.\r\n\r\n**Web.config (host remote dataportal)**\r\n`\r\n  <system.serviceModel>\r\n\r\n    <services>\r\n        <service name=\"Csla.Server.Hosts.WcfPortal\" behaviorConfiguration=\"returnFaults\">\r\n            <endpoint binding=\"customBinding\" bindingConfiguration=\"customBinding_IWcfPortal\" contract=\"Csla.Server.Hosts.IWcfPortal\"/>\r\n        </service>\r\n    </services>\r\n    \r\n    <bindings>\r\n\r\n      <customBinding>\r\n        <binding name=\"customBinding_IWcfPortal\">\r\n          <binaryMessageEncoding compressionFormat=\"GZip\"/>\r\n          <httpTransport authenticationScheme=\"None\"  decompressionEnabled=\"true\" maxReceivedMessageSize=\"2147483647\" maxBufferSize=\"2147483647\"/>\r\n        </binding>\r\n      </customBinding>\r\n      \r\n        </binding>\r\n      </wsHttpBinding>\r\n    </bindings>\r\n    \r\n    \r\n    <behaviors>\r\n      <serviceBehaviors>\r\n        <behavior name=\"returnFaults\">\r\n          <serviceDebug includeExceptionDetailInFaults=\"true\"/>\r\n        </behavior>\r\n      </serviceBehaviors>\r\n    </behaviors>\r\n    \r\n  </system.serviceModel>\r\n`\r\n\r\n**app.config (client)**\r\n`\r\n<appSettings>\r\n<add key=\"CslaDataPortalProxy\" value=\"Csla.DataPortalClient.WcfProxy, Csla\"/>\r\n</appSettings>\r\n  <system.serviceModel>\r\n    <client>\r\n      <endpoint name=\"WcfDataPortal\" address=\"http://localhost:3015/WcfPortal.svc\" binding=\"customBinding\" contract=\"WcfPortal.IWcfPortal\"/>\r\n    </client>\r\n    <bindings>\r\n      <customBinding>\r\n        <binding name=\"customBinding_IWcfPortal\">\r\n          <binaryMessageEncoding compressionFormat=\"GZip\" />\r\n          <httpTransport authenticationScheme=\"None\" decompressionEnabled=\"true\" maxReceivedMessageSize=\"2147483647\" maxBufferSize=\"2147483647\"/>\r\n        </binding>\r\n      </customBinding>\r\n    </bindings>\r\n  </system.serviceModel>\r\n`\r\n\r\nHowever, I get the error below when I try and run the solution (if I use basicHttpBinding all works just slooowly).  As you can see, I do have a tag defining httpTransport so I'm wondering if anyone else might have a solution or a suggestion?\r\n\r\n**ERROR**\r\nAn exception of type 'System.InvalidOperationException' occurred in Csla.dll but was not handled in user code\r\n\r\nAdditional information: The CustomBinding on the ServiceEndpoint with contract 'IWcfPortal' lacks a TransportBindingElement.  Every binding must have at least one binding element that derives from TransportBindingElement.\r\n\r\nThanks\r\nMark"},"comment":{"url":"https://api.github.com/repos/MarimerLLC/cslaforum/issues/comments/217548132","html_url":"https://github.com/MarimerLLC/cslaforum/issues/180#issuecomment-217548132","issue_url":"https://api.github.com/repos/MarimerLLC/cslaforum/issues/180","id":217548132,"user":{"login":"rockfordlhotka","id":2333134,"avatar_url":"https://avatars.githubusercontent.com/u/2333134?v=3","gravatar_id":"","url":"https://api.github.com/users/rockfordlhotka","html_url":"https://github.com/rockfordlhotka","followers_url":"https://api.github.com/users/rockfordlhotka/followers","following_url":"https://api.github.com/users/rockfordlhotka/following{/other_user}","gists_url":"https://api.github.com/users/rockfordlhotka/gists{/gist_id}","starred_url":"https://api.github.com/users/rockfordlhotka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockfordlhotka/subscriptions","organizations_url":"https://api.github.com/users/rockfordlhotka/orgs","repos_url":"https://api.github.com/users/rockfordlhotka/repos","events_url":"https://api.github.com/users/rockfordlhotka/events{/privacy}","received_events_url":"https://api.github.com/users/rockfordlhotka/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T20:19:30Z","updated_at":"2016-05-06T20:19:30Z","body":"Behind the firewall you are hosting the data portal in IIS/ASP.NET, so you have everything you need right there. In that very same appserver project that hosts the data portal you can create an http endpoint (exactly how depends on your version of ASP.NET) that directly download the files based on an http request.\r\n\r\nOn the client you can use the latest http client implementation (which one depends on your version of .NET) to download the file (into memory if you choose) from that endpoint.\r\n\r\nThat'll tap into a lower level and generally more efficient http transfer mechanism as compared to WCF. Mostly it'll avoid pretty much _all_ serialization and related overhead, and that's a big deal for blobs!"}}