8. Configure and use the winform Client

Source: Internet
Author: User

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.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.