473,396 Members | 1,858 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,396 software developers and data experts.

Handling Exception in Web Services when using HttpGet protocol.

Hello

I have an application with several web services. I want to be able to log
all exception are thrown by any web method. Since the web services handler
catches and swallows all exceptions, and send them to the client in a soap
message, Global.asax's Application_Error method can't be used. So I made a
SoapExtension class that override ProcessMessage method. That solution
worked for HttpSoap protocol.
The problem is that my application web.config also enables the HttpGet
protoco because some clients needs it. When a client calls my web services
using HttpGet, the soap extensions are not invoked, and also Context.Error
is null. I can only know that an error occured in Application_EndRequest
method by checking that Response.StatusCode is 500. But I don't know how do
I get information about the exception itself.

Any help would be appreciated, thanks in advance.

Best regards,
Sherif
Nov 18 '05 #1
1 1183
I posted in the wrong newsgroup, sorry for the inconvenience. Still any help
would be appreciated. Thanks.

"Sherif ElMetainy" <el******@thewayout.net> wrote in message
news:el**************@tk2msftngp13.phx.gbl...
Hello

I have an application with several web services. I want to be able to log
all exception are thrown by any web method. Since the web services handler
catches and swallows all exceptions, and send them to the client in a soap
message, Global.asax's Application_Error method can't be used. So I made a
SoapExtension class that override ProcessMessage method. That solution
worked for HttpSoap protocol.
The problem is that my application web.config also enables the HttpGet
protoco because some clients needs it. When a client calls my web services
using HttpGet, the soap extensions are not invoked, and also Context.Error
is null. I can only know that an error occured in Application_EndRequest
method by checking that Response.StatusCode is 500. But I don't know how do I get information about the exception itself.

Any help would be appreciated, thanks in advance.

Best regards,
Sherif

Nov 18 '05 #2

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

Similar topics

9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
4
by: m96 | last post by:
hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i can't read the custom attributes/fields, since .net...
34
by: rawCoder | last post by:
I have read that Exception Handling is expensive performance wise ( other than Throw ) , but exactly how ? Please consider the following example ... ////////////////// Code Block 1...
1
by: Noor | last post by:
Hi all, I am trying to catch all types of exceptions from a app regardless of whether it is in debugger mode( VS development environment) or run the.exe file outside the IDE. My App...
3
by: Daniel Bello Urizarri | last post by:
Hello: On the new Asp.net 2.0 the <protocols> section does not work. But without it, my application, which uses such protocols, does not work either How can I enable those protocols on aspnet...
2
by: Adrian Burka | last post by:
HELP! I have written a web service, and a program in C# using Microsoft Visual C#.NET to interact with the web service. Exception handling isn't working in my application, though. One function...
10
by: Penelope Dramas | last post by:
Hello, I am using following code to handle unhandled exceptions in Windows Forms. Shared Sub Main() Dim GlobalExceptionHandler As New GlobalExceptionHandler AddHandler...
0
by: =?Utf-8?B?TVA=?= | last post by:
I hosted my WCF service in a Console App. the service is tagged to run as a singleton , The service implements following two methods One that throws exception public void ThrowException() {...
9
by: arnuld | last post by:
Can anyone point me to some online/offline document on error handling in C ? I am doing some Socket Programming in C and feeling a lots of difficult in error handling :( Also some time ago...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.