Jump to: navigation, search

Difference between revisions of "Configuration Files/Bindings.config"


 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
In this file the bindings can be configured to provide different configurations for data services and endpoints, specified by the name, which then is used in the service/client configuration.
+
== Bindings.config ==
 +
In this file the bindings can be configured to provide different configurations for data services and endpoints - specified by the name, which then is used in the service/client configuration.
  
 +
===Configuration===
 
See [http://msdn.microsoft.com/en-us/library/ms733099%28v=vs.110%29.aspx Configuring Bindings for Windows Communication Foundation Services] for further details and [http://msdn.microsoft.com/en-us/library/hh924831%28v=vs.110%29.aspx Configuring Timeout Values on a Binding] for information about timeout configuration.
 
See [http://msdn.microsoft.com/en-us/library/ms733099%28v=vs.110%29.aspx Configuring Bindings for Windows Communication Foundation Services] for further details and [http://msdn.microsoft.com/en-us/library/hh924831%28v=vs.110%29.aspx Configuring Timeout Values on a Binding] for information about timeout configuration.
  
{{Attention|If the service has to support the streaming transfer mode - e.g. used for downloading large data branches in the UBIK client, ensure to a the section for "BasicHttpBinding_UBIKContent"}}
+
====Download large data branches====
 +
If the service has to support the streaming transfer mode - e.g. used for downloading large data branches in the UBIK client, ensure to provide the binding definition for "BasicHttpBinding_UBIKContent" (see example). The client setting "[[Settings#WinX|ContentServiceConfig]]" should be set accordingly.
  
<syntaxhighlight lang="xml">
+
====Upload of large files====
<system.serviceModel>
+
For security reasons, we allow uploading files with a size of 2000000 Bytes (2MB). To increase the size the attributes '''maxBufferPoolSize''', '''maxReceivedMessageSize''', '''maxBufferSize''', '''maxStringContentLength''', '''maxArrayLength''', '''maxBytesPerRead''', '''maxNameTableCharCount''' must be adapted in their respective tags '''webHttpBinding'',  ''basicHttpBinding''', and '''wsHttpBinding'''.
  ...  
+
 
  <bindings>
+
{{Hint|The relevant settings for uploading large files are handled in Bytes.}}
    <webHttpBinding>
+
{{Attention|The [[Configuration_Files/web.config#Upload_of_large_files]] must also be adapted otherwise, the upload will fail.}}
      <binding transferMode="Streamed" name="WebHttpBinding_UBIKContent" sendTimeout="00:05:00" maxBufferPoolSize="67108864" maxReceivedMessageSize="67108864" maxBufferSize="67108864" receiveTimeout="01:00:00">
+
 
 +
{{Attention|If you are using Windows Internet Information Services (IIS), the maximum upload file size must be reconfigured in IIS otherwise the upload will fail. [[HowTo:Configure_Microsoft_IIS_for_UBIK#Configure_Upload_of_large_files]]}}
 +
 
 +
===== Example Upload of files with 200MB Size=====
 +
<source lang="XML">
 +
<wsHttpBinding>
 +
    <binding  
 +
            name="WSHttpBinding"  
 +
            sendTimeout="00:05:00"  
 +
            maxBufferPoolSize="200000000"  
 +
            maxReceivedMessageSize="200000000"  
 +
            receiveTimeout="01:00:00">
 +
        <readerQuotas
 +
                maxDepth="32"
 +
                maxStringContentLength="200000000"
 +
                maxArrayLength="200000000"
 +
                maxBytesPerRead="200000000"
 +
                maxNameTableCharCount="200000000"/>
 
         <security mode="Transport">
 
         <security mode="Transport">
          <transport clientCredentialType="None"/>
+
            <transport clientCredentialType="None"/>
 
         </security>
 
         </security>
      </binding>
+
     </binding>
     </webHttpBinding>
+
     <binding name="WSHttpBinding_IUBIKPush">
    <basicHttpBinding>
+
      <binding name="BasicHttpBinding_IUSAM" 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>
+
      <!-- USED FOR STREAMING TRANSFER MODE -->
+
      <binding name="BasicHttpBinding_UBIKContent"
+
transferMode="Streamed"
+
sendTimeout="00:05:00"
+
            maxBufferPoolSize="67108864"
+
            maxReceivedMessageSize="67108864"
+
receiveTimeout="01:00:00">
+
  <security mode="Transport">
+
            <transport clientCredentialType="None" />
+
          </security>
+
        </binding>
+
     </basicHttpBinding>
+
    <wsHttpBinding>
+
      <binding name="WSHttpBinding_IUSAM" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
+
    maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
+
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
+
        <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
+
 
         <security mode="Transport">
 
         <security mode="Transport">
          <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
+
            <transport clientCredentialType="None"/>
          <message clientCredentialType="Windows" negotiateServiceCredential="true"/>
+
 
         </security>
 
         </security>
      </binding>
+
    </binding>
      <binding name="WSHttpBinding_UBIKContent" maxReceivedMessageSize="67108864" receiveTimeout="01:00:00">
+
</wsHttpBinding>
        <security mode="Transport">
+
</source>
          <transport clientCredentialType="None"/>
+
 
        </security>
+
      </binding>
+
      <binding name="WSHttpBinding_IUBIKPush">
+
        <security mode="Transport">
+
          <transport clientCredentialType="None" />
+
        </security>
+
      </binding>
+
    </wsHttpBinding>
+
  </bindings>
+
  ...
+
</system.serviceModel>
+
</syntaxhighlight>
+
 
== See also ==
 
== See also ==
 
* [[Configuration Files]]
 
* [[Configuration Files]]
  
 
[[Category:Installing|Configuration Files/Bindings.config]]
 
[[Category:Installing|Configuration Files/Bindings.config]]

Latest revision as of 09:48, 25 April 2024

Bindings.config

In this file the bindings can be configured to provide different configurations for data services and endpoints - specified by the name, which then is used in the service/client configuration.

Configuration

See Configuring Bindings for Windows Communication Foundation Services for further details and Configuring Timeout Values on a Binding for information about timeout configuration.

Download large data branches

If the service has to support the streaming transfer mode - e.g. used for downloading large data branches in the UBIK client, ensure to provide the binding definition for "BasicHttpBinding_UBIKContent" (see example). The client setting "ContentServiceConfig" should be set accordingly.

Upload of large files

For security reasons, we allow uploading files with a size of 2000000 Bytes (2MB). To increase the size the attributes maxBufferPoolSize, maxReceivedMessageSize, maxBufferSize, maxStringContentLength, maxArrayLength, maxBytesPerRead, maxNameTableCharCount must be adapted in their respective tags webHttpBinding, basicHttpBinding, and wsHttpBinding.

IC Hint square.pngThe relevant settings for uploading large files are handled in Bytes.
IC Attention.pngThe Configuration Files/web.config must also be adapted otherwise, the upload will fail.
IC Attention.pngIf you are using Windows Internet Information Services (IIS), the maximum upload file size must be reconfigured in IIS otherwise the upload will fail. Configure Microsoft IIS for UBIK
Example Upload of files with 200MB Size
<wsHttpBinding>
    <binding
           name="WSHttpBinding"
           sendTimeout="00:05:00"
           maxBufferPoolSize="200000000"
           maxReceivedMessageSize="200000000"
           receiveTimeout="01:00:00">
        <readerQuotas
               maxDepth="32"
               maxStringContentLength="200000000"
               maxArrayLength="200000000"
               maxBytesPerRead="200000000"
               maxNameTableCharCount="200000000"/>
        <security mode="Transport">
            <transport clientCredentialType="None"/>
        </security>
    </binding>
    <binding name="WSHttpBinding_IUBIKPush">
        <security mode="Transport">
            <transport clientCredentialType="None"/>
        </security>
    </binding>
</wsHttpBinding>

See also