This article describes the
timeout property in Microsoft Visual Studio 2005 and in Microsoft Visual Studio .NET. You can set and
configure the
timeout property in the application configuration file.
The
timeout property is the channel configuration property, and you can
specify the
timeout property for the current channel in the configuration
file.
The value of the
timeout property is an integer that specifies the period that is before
the request should time out. To request no time-out period, set
timeout to
-1.
Setting the
timeout property is a useful way to build an application by using the
configuration file. Otherwise, you must create properties and set properties
programmatically, and then you must pass values to the
constructors.
The following example shows how you can set the
timeout property in the application configuration file:
Note In the following example, the time-out period is set to 10,000.
<configuration>
<system.runtime.remoting>
<application>
...
<channels>
<channel ref="http">
<formatter ref="soap"/>
<provider ref="propsetter" username="bob" writeToConsole="true">
<endpoint allowAutoRedirect="true"/>
<endpoint preauthenticate="true"/>
<endpoint url="example.com:9000" password="xyz" />
<endpoint url="example.com:9001" password="123" />
<endpoint timeout="10000"/>
</provider>
</channel>
</channels>
...
</application>
</system.runtime.remoting>
</configuration> For more information, visit the following Microsoft
Developer Network (MSDN) Web site: