Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2004

Tip: Looking for answers? Try searching our database.

TimeOut - ThreadAbortException

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darren Mombourquette - 23 Jun 2004 22:18 GMT
I'm getting an Unhandled Exception from WSE2 and I know it's related
to a timeout problem but I'm not sure where to set the timeout expiry.

Essentially if you take the Sample project "Microsoft
WSE\v2.0\Samples\CS\QuickStart\TcpStockSoapReceiver" in the
StockServiceRequestReceiver.cs class and Sleep for over 2 minutes,
before the response is sent back you will get a threadAbort exception.

e.g. Add System.Threading.Thread.Sleep(new TimeSpan(0,2,15)); around
line 80;

The exception is as follows:

Unhandled Exception: System.Exception: WSE104: An asynchronous
callback raised a
n exception. ---> System.Threading.ThreadAbortException: Thread was
being aborte
d.
  at Microsoft.Web.Services2.Messaging.SoapReceiver.ProcessMessage(SoapEnvelope
message)
  at Microsoft.Web.Services2.Messaging.SoapReceivers.OnReceiveComplete(IAsyncRe
sult ar)
  at Microsoft.Web.Services2.AsyncResult.Complete(Boolean
completedSynchronousl
y, Exception exception)
  --- End of inner exception stack trace ---
  at Microsoft.Web.Services2.AsyncResult.RaiseUnhandledException(Object
o)

Thanks,
Darren Mombourquette
ByronKim - 24 Jun 2004 07:37 GMT
Please check the event log and will see the detailed error, like "'Failed to
dispatch".

thanks
Byron KIM
> I'm getting an Unhandled Exception from WSE2 and I know it's related
> to a timeout problem but I'm not sure where to set the timeout expiry.
[quoted text clipped - 17 lines]
>  message)
>    at
Microsoft.Web.Services2.Messaging.SoapReceivers.OnReceiveComplete(IAsyncRe
> sult ar)
>    at Microsoft.Web.Services2.AsyncResult.Complete(Boolean
[quoted text clipped - 6 lines]
> Thanks,
> Darren Mombourquette
Darren Mombourquette - 24 Jun 2004 13:23 GMT
Hi Byron,
Thanks for responding, I get nothing in the event log. Is there a way
to extend the timeout for the SoapReceiver?

Darren

> Please check the event log and will see the detailed error, like "'Failed to
> dispatch".
[quoted text clipped - 34 lines]
> > Thanks,
> > Darren Mombourquette
Sidd - 25 Jun 2004 00:56 GMT
Hi Darren,

   There in total 4 timeout values that you need to watch for when
designing your scenario:
   1. Execution Timeout
   2. Idle Timeout
   3. Send Timeout
   4. Receive Timeout

   What is most likely happening here is that on your server, since you are
sleeping for a little over 2 minutes,
   your execution timeout at the server is being triggrered, hence you get
the Thread Abort exception. Once the execution timeout
   is reached, the WSE framework will kill the thread that is currently
processing the particular request, to provide some safeguard
   against someone who is continuously sending data for a very very long
time.

   I actually inserted this line of code in the sample you mention, and
after increasing the execution timeout at the server side, I was
   able to receive the request fine, without any exceptions happening.

   To change the execution timeout at the server, edit your config file and
insert the following:

   <microsoft.web.services2>
       <messaging>
           <executionTimeout value="180" />            // denotes 180
seconds
       </messaging>
       ...
       ...
   </microsoft.web.services2>

   You can find out how to set these individual timeouts by lookign at the
WSE.Config file in the "Microsoft WSE\v2.0" directory
   of where you installed this.

Hope this helps!

Sidd

> Hi Byron,
> Thanks for responding, I get nothing in the event log. Is there a way
[quoted text clipped - 26 lines]
> > > d.
> > >    at

Microsoft.Web.Services2.Messaging.SoapReceiver.ProcessMessage(SoapEnvelope
> > >  message)
> > >    at

Microsoft.Web.Services2.Messaging.SoapReceivers.OnReceiveComplete(IAsyncRe
> > > sult ar)
> > >    at Microsoft.Web.Services2.AsyncResult.Complete(Boolean
> > > completedSynchronousl
> > > y, Exception exception)
> > >    --- End of inner exception stack trace ---
> > >    at
Microsoft.Web.Services2.AsyncResult.RaiseUnhandledException(Object
> > > o)
> > >
> > > Thanks,
> > > Darren Mombourquette
Darren Mombourquette - 25 Jun 2004 15:36 GMT
Excellent Sidd,
Thank you.

Darren

> Hi Darren,
>
[quoted text clipped - 88 lines]
> > > > Thanks,
> > > > Darren Mombourquette

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.