Visual Studio “Add Service Reference” - not gets all service settings RRS feed

  • Question

  • my purpose is to ensure that - when someone clicks on "Add Service Reference" in his own Visual Studio, and he adds references to my WCF service - he receives not the default settings, but the settings of the service.

    In particular, there is a property of the "binding" class that interests me: useDefaultWebProxy, I need it setted to "false".

    I tried this, but with no results: In the Web.config file of the service:

        <binding name="NewBinding0" ... useDefaultWebProxy="false"> 
         <readerQuotas ... /> 
       <service behaviorConfiguration="NewBehavior0" name="pippo.pluto"> 
        <endpoint address="" behaviorConfiguration="" binding="basicHttpBinding"  
                 bindingConfiguration="NewBinding0" name="pluto" contract="pippo.ipluto" /> 
         <timeouts ... /> 
        <behavior name="NewBehavior0"> 
         <serviceMetadata ... /> 
         <serviceDebug ... /> 

    Nothing to do: in the client's Web.config I always get...

      <binding name="pluto" ... useDefaultWebProxy="true"> 
       <readerQuotas ... /> 
       <security ...> 
        <transport ... /> 
        <message ... /> 

    It seems that the bindingConfiguration of the service is completely ignored, not only useDefaultWebProxy but also other properties - for example maxBufferSize - maintain the default values (65536)

    How can I do?


    Monday, September 3, 2012 1:56 PM