winform before a client application, specify csla Recognition Certificate method, although csla supports multiple authentication methods, however, ibeammdaa custom authentication is preferred.
In addition, you also need to determine the point of the application server.
The configuration example is as follows:
<Appsettings>
Add key = " cslaauthentication " value =" csla "/>
<Add Key="Csladataportalproxy"Value="Csla. dataportalclient. wcfproxy, csla"/>
<! --
<Add key = "csladataportalproxy" value = "csla. dataportalclient. localproxy, csla"/>-->
</Appsettings>
<System. servicemodel>
<Client>
< Endpoint Name = "Wcfdataportal"Address="Http: // localhost: 8000/"Binding="Custombinding"Bindingconfiguration="Compactbinding"Contract="Csla. server. Hosts. iwcfportal"/>
</Client>
<Behaviors>
<Endpointbehaviors>
<Behavior Name="Servicecertificate">
<Clientcredentials>
servicecertificate >
authentication certificatevalidationmode = " peertrust " />
</Servicecertificate>
</Clientcredentials>
</Behavior>
</Endpointbehaviors>
</Behaviors>
<Bindings>
<Custombinding>
binding name = " compactbinding " sendtimeout =" 00:10:00 ">
<Compactmessageencoding>
<Binarymessageencoding>
< Readerquotas Maxdepth = "64"Maxstringcontentlength="2147483647"Maxarraylength="2147483647"Maxbytesperread="4096"Maxnametablecharcount="16384"/>
</Binarymessageencoding>
</Compactmessageencoding>
<Httptransport Maxcompute edmessagesize="2147483647"/>
</Binding>
</Custombinding>
</Bindings>
<Extensions>
bindingelementextensions >
Add name = " compactmessageencoding " type =" AMIB. WCF. compactmessageencodingelement, compactmessageencoder, version = 1.0.0.0, culture = neutral, publickeytoken = NULL "/>
</Bindingelementextensions>
</Extensions>
</System. servicemodel>
In addition, ifWinformThe configuration of the client is to directly access data. Refer to the configuration of the application server in the previous section.
The above listWinformClient configuration, but framework users do not need to writeCodeConfiguration, you only need to understand the concept,IbeammdaaThe client application has been integrated with the configuration function, which can be selected on the user interface during logon.