locked
wpf app.config does not replace binding from wf4 RRS feed

  • General discussion

  • Hello
    I have a WF type project and other WPF type project.
    I am trying to configure the binding from my wf for changing maxReceivedMessageSize property, but when I do reference to my service in the app.config does not has the same value that the Web.config file from WF.
    Can somebody help me please?
    here are my configuration files.
    Thanks

    Web.config

    --------------------------------------------------------------------

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

      <system.web>

        <compilation debug="true" strict="false" explicit="true" />

      </system.web>
    <
    system.serviceModel>

        <services>

          <service name="ObtenerPaquetesPendientesPorUsuario">

            <endpoint address="" binding="basicHttpBinding"

                      bindingConfiguration="httpBasicBinding_Service"

                      bindingNamespace=http://xxx.com/IntegraSF

                      contract="IObtenerPaquetesPendientesPorUsuario" />

    </service>

       
    </
    services>

       
    <
    bindings>

         
    <basicHttpBinding>

            <binding name="httpBasicBinding_Service" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00" maxBufferSize="2000001" maxBufferPoolSize="2000001" maxReceivedMessageSize="2000001">

              <readerQuotas maxDepth="2000001" maxStringContentLength="2000001" maxArrayLength="2000001" maxBytesPerRead="2000001" maxNameTableCharCount="2000001" />

       </binding>

          </basicHttpBinding>

    </bindings>

        <behaviors>

          <serviceBehaviors>

            <behavior>

              <serviceMetadata httpGetEnabled="true" />

              <serviceDebug includeExceptionDetailInFaults="true" />

              <workflowIdle timeToUnload="0" />

            </behavior>

          </serviceBehaviors>

        </behaviors>

        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

      </system.serviceModel>

      <system.webServer>

        <modules runAllManagedModulesForAllRequests="true" />

      </system.webServer>

    </configuration>

    App.config

    ------------------------------------------------------------------------------

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

     <startup>

        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0.1,Profile=Client" />

      </startup>

      <system.serviceModel>

        <bindings>

          <basicHttpBinding>

            <binding name="BasicHttpBinding_IObtenerPaquetesPendientesPorUsuario"

              closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"

              sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"

              hostNameComparisonMode="StrongWildcard" maxBufferSize="65536"

              maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"

              textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">

              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

                maxBytesPerRead="4096" maxNameTableCharCount="16384" />

              <security mode="None">

                <transport clientCredentialType="None" proxyCredentialType="None"

                  realm="" />

                <message clientCredentialType="UserName" algorithmSuite="Default" />

              </security>

            </binding>

          </basicHttpBinding>

        </bindings>


        <client>

          <endpoint address="http://localhost:56002/flujosDeTrabajo/BibliotecaDeActividades/ObtenerPaquetesPendientesPorUsuario.xamlx"

            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IObtenerPaquetesPendientesPorUsuario"

            contract="FlujosDeTrabajo.ObtenerPaquetesPendientesPorUsuario.IObtenerPaquetesPendientesPorUsuario"

     nme="BasicHttpBinding_IObtenerPaquetesPendientesPorUsuario" />

      
    </
    client>

    </system.serviceModel>

    </configuration>


    • Edited by jair_santos Wednesday, February 15, 2012 7:21 PM
    • Changed type LeoTang Thursday, March 15, 2012 7:38 AM
    Wednesday, February 15, 2012 5:06 PM

All replies

  • Hi,

    Web.config file is only used by ASP.NET-hosted web application. I don't think it has any relationship with the configuration file for an Executable-hosted application(app.config). What's is exactly you want to achieve?

    Friday, February 17, 2012 12:06 PM
  • HI, thanks for your answer, I want to change maxReceivedMessageSize property in my app.config automatically with the same value of my web config file.
    Regards
    Jair
    Friday, February 17, 2012 3:37 PM