Solved

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

Posted on 2006-11-10
4
298 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
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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.
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 …

730 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