MSDN > 論壇首頁 > Windows Communication Foundation > Is there a way to obtain the server binding parameters configuration from the client?
發問發問
 

已答覆Is there a way to obtain the server binding parameters configuration from the client?

  • Thursday, 2 July, 2009 21:29BaronFreeman 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    So, here I am in Silverlight, I am creating my binding and I want to set my MaxReceivedMessageSize to the max set supported by the server.

    How do I create a query to get the server to send me that information?

    As a last resort, I'll create a dummy service that only reads the current WCF configuration and passes the parameter information, but I really don't want to do that.

    There must be a better way.

    What do you think?

    TIA,
    -Baron

解答

  • Friday, 3 July, 2009 20:48Lars WilhelmsenMVP, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Hi,

     Since Silverlight only supports WS-I Basic Profile 1.0 (plain SOAP 1.1 over HTTP w/o any support for WS-* standards) WS-Policy information is not
     embedded in the WSDL generated for the service. Because of this, you are not able to pull information about the server-side binding configuration.

     So, if you want to be able to dynamically adjust the configuration parameters, you would have to do it out-of-band (a separate configuration metadata service might be a feasible solution).

     --larsw
    Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/

所有回覆

  • Friday, 3 July, 2009 20:48Lars WilhelmsenMVP, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆
    Hi,

     Since Silverlight only supports WS-I Basic Profile 1.0 (plain SOAP 1.1 over HTTP w/o any support for WS-* standards) WS-Policy information is not
     embedded in the WSDL generated for the service. Because of this, you are not able to pull information about the server-side binding configuration.

     So, if you want to be able to dynamically adjust the configuration parameters, you would have to do it out-of-band (a separate configuration metadata service might be a feasible solution).

     --larsw
    Lars Wilhelmsen | Senior Consultant | Miles, Norway | Connected Systems MVP | http://larswilhelmsen.com/
  • Tuesday, 7 July, 2009 0:39BaronFreeman 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hey Lars,

    Thanks a bunch. I thought that might be the case, but I wanted to be sure.

    -Baron