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
Solved

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

Posted on 2006-11-10
4
287 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

856 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