Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<basicHttpBinding> attributes 1

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
0
0
US
Doing some webservice requests. Pulling data from 10-12 different business servers.

Sometimes one service will hang and ultimately timeout by default settings of 1 minute.
I don't wait to wait the whole minute so I need to reduce the time to 10 or 15 seconds per service.
I'm looking at three attributes I can set for the basicHttpBindings; open timeout, send time out & receive time out. Rend & Receive are easy.

My question is: Is the open timeout attribute inclusive of the send and receive attributes together?
I think it is but just want to make sure.

Thanks

-dan



 
from=[URL unfurl="true" said:
https://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding(v=vs.110).aspx"[/URL]]
OpenTimeout

Gets or sets the interval of time provided for a connection to open before the transport raises an exception.(Inherited from Binding.)

So to me, I would interpret the timeouts to be exclusive of each other.

On another note, you should be calling this service asyncronously, this way, even if one times out, it will not stop you from getting the data from the other calls.
 
Hi Jbenson,

I had read this earlier today:
Client-side Timeouts

SendTimeout – used to initialize the OperationTimeout, which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

OpenTimeout – used when opening channels when no explicit timeout value is specified

CloseTimeout – used when closing channels when no explicit timeout value is specified

Link

The statement above for send timeout is what lead me to believe it was inclusive of the open & close timeout.

Since the number of services I need to consume varies by client I pull the clients webservice requirements
into a dataset and as I iterate through the dataset it makes a call to the appropriate webservice and is actually waiting for it to respond or error before moving on to the next call.

Are you saying if I make an asynchronous request I can move on to the next request without waiting for a response? That would be great

-dan


 
Yes, that is what an Asynchronous call is. You make some sort of call, be it a DB call or web service all, and forget about it and move on. Once the call is done, then you do something with the results and continue on to the next finished call... etc...
This way you can have multiple calls getting data at the same time and if one fails or takes a long time time, it won't hose up the whole process.
 
Ok, I'll have to go read up on the Async's Sounds like something I should be doing. Right now as I iterate through a dataset
that has 8-16 rows I'm firing off a function that calls a webservice and it waits for a response before moving to the next one.
If one of those servers is slow or down it just sits and waits for the timeout (which I can adjust) but the Asysnc sounds like a much faster process.
If you know of any good links to get me pointed in the right direction I'll sure look at them

Thank You Very Much :)


-dan
 
I was actually starting to research this today :) Thank you for the Links.

I was reading one article this morning whee it says that at least Net 4.5 was the best to use for this.

I'm going to install VS 2015 today and upgrade. I'll make this (Async) my first project.

Thanks Again :)

-dan
 
Any time.
Yes, I forgot to mention in my last post that you need 4.5 for it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top