?
Solved

what does a remoting method return if it timesout in .net2?

Posted on 2006-11-10
4
Medium Priority
?
321 Views
Last Modified: 2010-04-16
if I have a method called getSomeData() that returns a string, then what will happen if the call timesout in .net 2 ?

example string s = myRemotingObject.getSomeData();

how do i control timeouts also or set their length?

please advice how to deal/handle timeouts
0
Comment
Question by:joshuadavidlee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 2000 total points
ID: 17915626
It should throw a RemotingTimeoutException in that case.  You have to use a Try..Catch block to catch and handle that.

try {
    string s =  myRemotingObject.getSomeData();
    // At this point you know the data came back correctly, so use 's' with that assumption.

} catch (RemotingTimeoutException e) {
    // There was a timeout; do what you like to resolve it.
}
0
 

Author Comment

by:joshuadavidlee
ID: 17916247
ok can i set the timeout limit in .net 2 ?
0
 

Author Comment

by:joshuadavidlee
ID: 17916253
and does timeout mean the time for it to complete the method or doe si tmean nothing shappening?

for example what if it takes 5 minutes to transfer a file and i set it to timeout 30 seconds?
0
 
LVL 6

Expert Comment

by:badalpatel
ID: 17919867
There are two places you may have to change:

1. Change the ASP.NET timeout
http://www.devx.com/vb2themax/Tip/18803

This is the most likely culprit of your errors

2. Use the Timeout property of your proxy class to set the proper time on
the client.

WebReference.ProxyClass myProxy = new WebReference.ProxyClass();
// Set the timeout in milliseconds -- e.g. 100 seconds
myProxy.Timeout = 100000;

Hope that helps.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question