Print Page | Close Window

Increase timeout for winclient applications

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1826
Printed Date: 16-Apr-2024 at 8:08am


Topic: Increase timeout for winclient applications
Posted By: enterprisetoday
Subject: Increase timeout for winclient applications
Date Posted: 19-May-2010 at 12:46am
Hi,

I have read a few articles about increasing the timeout which deal specifically with silverlight/async/web setups.
I would like to increase the default timeout of 1 minute for my winclient app.

System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

I tried to implement some of the suggestions from

http://social.msdn.microsoft.com/Forums/en/wcf/thread/692f5631-c40c-40d7-9a98-8d0d7eb0994b
http://www.ideablade.com/forum/forum_posts.asp?TID=1438
http://www.ideablade.com/forum/forum_posts.asp?TID=1523


They are not helping me yet.  Anytime i make changes to the client app's config file, it fails with an ideablade exception - it can't read my config file correctly.


Thanks in advance,
Dallas



Replies:
Posted By: kimj
Date Posted: 19-May-2010 at 5:49pm
There are some sample config files in the Learning Resources which may help.  See the "Deployment\Snippets\Sample N-tier config files" folder.
 
In DF2009 you do have to modify the config files to change the default timeout values.  I'm not sure what exception you're getting, but if the samples don't help then post the exception details or debug log here.


Posted By: enterprisetoday
Date Posted: 24-May-2010 at 9:06pm
I updated my app.configs with the serviceModel details as provided in the learning resources. Notes:

1. Remove some <objectServer> details from both app.configs
2. comment <gzipMessageEncoding> sections because visual studio complains 'The element binding has invalid child element gzipMessageEncoding...

The client fails to start.
<entry id="12" timestamp="2010-05-25T13:45:46" username="" source="IdeaBlade.EntityModel.RemoteEntityServerProxy:CheckConnection">System.ServiceModel.FaultException: Unable to start EntityServer_RF2 service

The server, when visited with a browser gives a 'bad request, invalid hostname'
 
The configs are listed below for reference.





server app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration"
             type="IdeaBlade.Core.Configuration.IdeaBladeSection,
                   IdeaBlade.Core,
                   Version=5.1.0.0,
                   Culture=neutral,
                   PublicKeyToken=287b5094865421c0" />
  </configSections>
  <ideablade.configuration version="5.00"
                           updateFromDomainModelConfig="No">
    <logging logFile="DebugLog.xml" />
    <objectServer isDistributed="true" />
    <edmKeys>
      <edmKey name="SYSTEM-DEMO"
              connection="metadata=res://ServerModelSYSTEM/ServerModelSYSTEM.csdl|
                                   res://ServerModelSYSTEM/ServerModelSYSTEM.ssdl|
                                   res://ServerModelSYSTEM/ServerModelSYSTEM.msl;
                          provider=System.Data.SqlClient;&#xD;&#xA;
                          provider connection string=&quot;&#xD;&#xA;
                          Data Source=camino;&#xD;&#xA;
                          Initial Catalog=SYSTEM8;&#xD;&#xA;
                          Persist Security Info=True;&#xD;&#xA;
                          User ID=REPLACED;Password=REPLACED;&#xD;&#xA;
                          MultipleActiveResultSets=True&quot;"
              containerName="EntityFramework.ServerModelSYSTEMContext"
              logTraceString="true">
        <probeAssemblyNames>
          <probeAssemblyName name="DomainModel" />
          <probeAssemblyName name="ServerModelSYSTEM" />
        </probeAssemblyNames>
      </edmKey>
    </edmKeys>
  </ideablade.configuration>
  <system.serviceModel>
    <services>
      <service name="EntityService">
        <endpoint address="http://localhost:9009/EntityService"
                  binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                  contract="IdeaBlade.EntityModel.IEntityServiceContract"
                  />
      </service>
      <service name="EntityServer">
        <endpoint address="http://localhost:9009/EntityServer"
                  binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                  contract="IdeaBlade.EntityModel.IEntityServerContract"
                  />
      </service>
    </services>
    <bindings>
      <customBinding>
        <binding name="compressedBinaryBinding"
                 closeTimeout="00:01:00"
                 openTimeout="00:01:00"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:01:00">
          <!--<gzipMessageEncoding>
            <readerQuotas
              maxDepth="2147483647"
              maxStringContentLength="2147483647"
              maxArrayLength="2147483647" />
          </gzipMessageEncoding>-->
          <httpTransport maxReceivedMessageSize="2147483647" />
        </binding>
      </customBinding>
    </bindings>
    <extensions>
     <bindingElementExtensions>
         <!--<add name="gzipMessageEncoding"
             type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>-->
      </bindingElementExtensions>
    </extensions>
  </system.serviceModel>
</configuration>




client app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ideablade.configuration"
             type="IdeaBlade.Core.Configuration.IdeaBladeSection,
                   IdeaBlade.Core,
                   Version=5.1.0.0,
                   Culture=neutral,
                   PublicKeyToken=287b5094865421c0" />
  </configSections>
  <ideablade.configuration version="5.00"
                           updateFromDomainModelConfig="No">
    <logging logFile="DebugLog.xml" />
    <objectServer isDistributed="true" />
    <edmKeys>
      <edmKey name="SYSTEM-DEMO"
              connection="metadata=res://ServerModelSYSTEM/ServerModelSYSTEM.csdl|
                                   res://ServerModelSYSTEM/ServerModelSYSTEM.ssdl|
                                   res://ServerModelSYSTEM/ServerModelSYSTEM.msl;
                          provider=System.Data.SqlClient;&#xD;&#xA;
                          MultipleActiveResultSets=True&quot;"
              containerName="EntityFramework.ServerModelSYSTEMContext"
              logTraceString="true">
        <probeAssemblyNames>
          <probeAssemblyName name="DomainModel" />
          <probeAssemblyName name="ServerModelSYSTEM" />
        </probeAssemblyNames>
      </edmKey>
    </edmKeys>
  </ideablade.configuration>
  <system.serviceModel>
    <client>
      <endpoint name="EntityService"
                address="http://localhost:9009/EntityService"
                binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                contract="IdeaBlade.EntityModel.IEntityServiceContract"
                />
      <endpoint name="EntityServer"
                address="http://localhost:9009/EntityServer"
                binding="customBinding" bindingConfiguration="compressedBinaryBinding"
                contract="IdeaBlade.EntityModel.IEntityServerContract"
                />
    </client>
    <bindings>
      <customBinding>
        <binding name="compressedBinaryBinding"
                 closeTimeout="00:01:00"
                 openTimeout="00:01:00"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:01:00">
          <gzipMessageEncoding>
            <readerQuotas
                 maxDepth="2147483647"
                 maxStringContentLength="2147483647"
                 maxArrayLength="2147483647" />
          </gzipMessageEncoding>
          <httpTransport maxReceivedMessageSize="2147483647" />
        </binding>
      </customBinding>
    </bindings>
    <extensions>
      <bindingElementExtensions>
        <!--<add name="gzipMessageEncoding"
             type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/>-->
      </bindingElementExtensions>
    </extensions>
  </system.serviceModel>
</configuration>










Posted By: kimj
Date Posted: 25-May-2010 at 10:23am
A few things to look at -
 
1) The VS Intellisense complaint about the gzipMessageEncoding is innocuous.  As long as IdeaBlade.Core.dll is available at run time, you can use this encoding.
 
2) The bindings need to be the same on both client and server.  Your client binding still has the gzipMessageEncoding defined but has commented out the bindingElementExtension.  Make sure that both sides either use gzipMessageEncoding or do not.
 
3) If you're using the ServerConsole as the BOS host, then rename the server config file to ServerConsole.exe.config, if using the Windows Service, then name it ServerService.exe.config.  The same logic applies for your client, make sure that the .config in use at run time is a loose config file with the same name as the executable.  The reason for this is that the serviceModel configuration won't be processed correctly from a config file which .NET doesn't see as the application's configuration file (DevForce will see and try to read the serviceModel information in a config from a non-standard location, but it doesn't always do so correctly.)
 
If you're still having problems, post the entire contents of the debug logs from both client and server.
 
 
 



Print Page | Close Window