Solved

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

Posted on 2006-11-10
4
255 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
Comment Utility
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
Comment Utility
ok can i set the timeout limit in .net 2 ?
0
 

Author Comment

by:joshuadavidlee
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now