473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to trap System.Web.HttpException: Request timed out.?

Dear All,
I have a web Application "http://localhost/Web/WebForm1.aspx" that
calls a WebService from
"http://localhost/webserviceapp/service1.asmx"...I have set the
executionTimeout to 10 secs in Web.Config where my WebService is
installed.
<httpRuntime executionTimeout="10" appRequestQueueLimit="2" />

When I call a method "TestPlan" which takes more than 10 secs my web
Page gets the following error:
Error: Client found response content type of 'text/html;
charset=utf-8', but expected 'text/xml'. The request failed with the
error message: --
Server Error in '/WebServiceApp' Application.
----------------------------------------------------------------------------

Request timed out.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request timed out.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): Request timed out.]

================================================== ================
How do trap this error in an elagant way and show it to the user?
I tried to trap the error on Application_Error function of Global.asax
of both my Web page and the WebService...
Sub Application_Error(ByVal sender As Object, _
ByVal e As EventArgs)
' Get the actual error that brought us here
Dim ex As Exception = _
Server.GetLastError.InnerException
' Display basic error information
Response.Write("An error occurred in the application:<br>")
Response.Write(ex.Message & "<br>")
Response.Write("Stack trace:<br>")
Dim s As StringBuilder = New StringBuilder(ex.StackTrace)
Response.Write(s.Replace(" at ", " at<br> "))
Response.End()
' Clear the error
Server.ClearError()
End Sub
But it did not work...I tried to trap the event on the Page's onError
method too it did not work...could someone please help...

TALIA

Many Regards
Jack
Nov 18 '05 #1
0 3765

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve | last post by:
Hi All, I keep getting the "System.Web.HttpException: Request timed out." error message when I was uploading image files (about 400 image files) to SQL table, all those image files are FTP to...
0
by: Jack Wright | last post by:
Dear All, I have a web Application "http://localhost/Web/WebForm1.aspx" that calls a WebService from "http://localhost/webserviceapp/service1.asmx"...I have set the executionTimeout to 10 secs in...
0
by: Frank | last post by:
Does anyone have any clues as to what might have caused this error? Only the startup web page uses ASP compatibility mode. I've tested this thru 100000s of cycles, and this recently appears in one...
5
by: Sachin Surana | last post by:
We use HttpWebRequest to send the request at a URL. But some times the method GetResponse throws a time out exception. But when we check the IIS logs, there is no such entry. So the request never...
8
by: A P | last post by:
Hi! I'm using ASP.Net Web Matrix on my PC and wanting to publish the files to our server. I try to copy (thru explorer) the files but it didn't work! I receive Runtime Error: Server Error...
3
by: Timo | last post by:
In javascript code on MyPage.aspx, I set a hidden IFRAME's source url: myframe.location.href = 'someotherpage.aspx'; If the session has timed out, preventing someotherpage.aspx from being...
2
by: tlan | last post by:
Hi, I got this error when I move my web service to Windows2003 server. I spent hours scouting on the internet and could find any answer. Please help!!! I the webservice is timeout between 1...
5
by: dpomt | last post by:
I have overwritten Application_Error in my GlobalAsax to handle errors. From time to time, I am getting exceptions I have never seen before (see below). What do this exceptions mean? Why are...
1
by: SHOPS | last post by:
Hi all, I know this is probably not the first time this questions has been asked, however I feel that we have an exceptional circumstance. We get the afforementioned error on almost every page...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.