473,795 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to trap System.Web.Http Exception: 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
executionTimeou t to 10 secs in Web.Config where my WebService is
installed.
<httpRuntime executionTimeou t="10" appRequestQueue Limit="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.Http Exception: 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_Err or function of Global.asax
of both my Web page and the WebService...
Sub Application_Err or(ByVal sender As Object, _
ByVal e As EventArgs)
' Get the actual error that brought us here
Dim ex As Exception = _
Server.GetLastE rror.InnerExcep tion
' 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(e x.StackTrace)
Response.Write( s.Replace(" at ", " at<br> "))
Response.End()
' Clear the error
Server.ClearErr or()
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 3837

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

Similar topics

0
12441
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 web server first, then my aspx page reads those image files from web server then uploads to SQL table (SQL server is in same machine as Web server), I have done following: set SQL connection timeout to 6000 (in web.config file), set SQL command...
0
995
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 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:
0
388
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 of the stress tests. This appeared after many cycles of successful execution for the same page: as in about 4 hours. Could have something timed out? Trace: System.Web.HttpException: Exception of type System.Web.HttpException was thrown....
5
9046
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 reached the server but the client is getting a time out exception. What could be the possible reasons? Confirmed that the request does not get lost in the network.
8
1837
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 in '/' Application. ---------------------------------------------------------------------------- ----
3
9564
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 loaded into the IFRAME, where can that error condition be trapped? Thanks Timo
2
25464
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 -2 minutes when my web app, which consume this webService, retrieves a large amount of data. When I perform the same operation to retrieve smaller amount of data, it works fine. The timeout value I set for my web app, web service, and sql
5
8323
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 they generated? Any help would be greatly appreciated. Dieter
1
5249
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 in our .net application. We even get in on the login screen to the app. The annoyance is that we have set teh timeout in the web.config file to 100000000. The timeout error happens within a couple of seconds of trying to loads a page. Clearly it...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7540
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.