Cslalight 3.8: Config WcfPortal service for using SL3 Binary XML?

Cslalight 3.8: Config WcfPortal service for using SL3 Binary XML?

Old forum URL: forums.lhotka.net/forums/t/7494.aspx


Cuong posted on Sunday, August 23, 2009

Hi,

I am using Cslalight 3.8 in a silverlight app. I want to use the new SL3 binary XML feature. I change the service configuration in the web.config (server side) like below:
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior name="WcfPortalBehavior">
                    <serviceMetadata httpGetEnabled="true"/>
                    <serviceDebug includeExceptionDetailInFaults="true"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
            <customBinding>
                <binding name="BinaryBinding">
                    <binaryMessageEncoding />
                    <httpTransport />
                </binding>
            </customBinding>
        </bindings>
        <services>
            <service behaviorConfiguration="WcfPortalBehavior" name="Csla.Server.Hosts.Silverlight.WcfPortal">
                <endpoint address="" binding="customBinding" bindingConfiguration="BinaryBinding" contract="Csla.Server.Hosts.Silverlight.IWcfPortal">
                    <identity>
                        <dns value="localhost"/>
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            </service>
        </services>
    </system.serviceModel>

But I get an exception " System.Net.WebException: The remote server returned an error: NotFound."

Does anybody successfully use the SL3 Binary XML feature with Cslalight? Did I config something wrong?



sergeyb replied on Sunday, August 23, 2009

Did you check ServiceReference.ClicnConfig to make sure it matches your web.config?

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: Cuong [mailto:cslanet@lhotka.net]
Sent: Sunday, August 23, 2009 5:29 AM
To: Sergey Barskiy
Subject: [CSLA .NET] Cslalight 3.8: Config WcfPortal service for using SL3 Binary XML?

 

Hi,

I am using Cslalight 3.8 in a silverlight app. I want to use the new SL3 binary XML feature. I change the service configuration in the web.config (server side) like below:
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior name="WcfPortalBehavior">
                    <serviceMetadata httpGetEnabled="true"/>
                    <serviceDebug includeExceptionDetailInFaults="true"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <bindings>
            <customBinding>
                <binding name="BinaryBinding">
                    <binaryMessageEncoding />
                    <httpTransport />
                </binding>
            </customBinding>
        </bindings>
        <services>
            <service behaviorConfiguration="WcfPortalBehavior" name="Csla.Server.Hosts.Silverlight.WcfPortal">
      & nbsp;         <endpoint address="" binding="customBinding" bindingConfiguration="BinaryBinding" contract="Csla.Server.Hosts.Silverlight.IWcfPortal">
                    <identity>
                        <dns value="localhost"/>
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            </service>
        </services>
    </system.serviceModel>

But I get an exception " System.Net.WebException: The remote server returned an error: NotFound."

Does anybody successfully use the SL3 Binary XML feature with Cslalight? Did I config something wrong?





Jack replied on Sunday, August 23, 2009

I made no changes as it was the default that changed.  Not sure if you had it running prior to 3.8 but if so try putting it back the way you had it.

Cuong replied on Sunday, August 23, 2009

@sergey: Yes, I check the ServiceReference.ClienConfig and it works if the service (server side) uses basicHttpBinding. I prepared a simple demo, could you have a look into it to check the problem?
http://www.mediafire.com/download.php?homqzzzazfm

@Jack: Do you mean that we do not need to change the service configuration in the web.config (server side)? Do we still keep the basicHttpBinding and WcfPortal will use Binary XML to transfer objects between clients and server?

Jack replied on Sunday, August 23, 2009

I may have spoken too soon - have a look at Rocky's reply to the 3.8 alpha 1 post.  He split the transfer into 4 pieces, the default change was to #2, not #4 which is what you are struggling with so I've still got to make the same changes you do as well.


Jack replied on Tuesday, August 25, 2009

Did you get this working?

 

From: Cuong [mailto:cslanet@lhotka.net]
Sent: August-23-09 6:32 PM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] RE: Cslalight 3.8: Config WcfPortal service for usingSL3 Binary XML?

 

@sergey: Yes, I check the ServiceReference.ClicnConfig and it works if the service (server side) uses basicHttpBinding. I prepared a simple demo, could you have look into it to check the problem?
http://www.mediafire.com/download.php?homqzzzazfm

@Jack: Do you mean that we do not need to change the service configuration in the web.config (server side). We still keep the basicHttpBinding and WcfPortal will use Binary XML to transfer objects between clients and server?


Cuong replied on Tuesday, August 25, 2009

Not yet, Jack. If you try my above demo, you will see the service works (with BinaryBinding). But there is an exception when Cslalight transfers objects between clients and server. I do not know the reason why. It seems that Cslalight 3.8.0 only supports basicHttpBinding?

RockfordLhotka replied on Wednesday, August 26, 2009

CSLA should work with any synchronous binding, it doesn't really care what you use with WCF as long as it is synchronous.

Cuong replied on Thursday, December 17, 2009

Now, does anybody successfully config the WcfPortal use the SL3 Binary XML feature?

My SL app needs to transfer lots raw data between clients/server. The speed to transfer raw data is quite slow, I want to use the SL3 Binary XML feature to improve it. Any suggestion is appreciated.

RockfordLhotka replied on Thursday, December 17, 2009

There are links in the FAQ

http://www.lhotka.net/cslanet/faq/DataPortalFaq.ashx

 

 

Copyright (c) Marimer LLC