Answered by:
Customize response

Question
-
User-600962003 posted
HI All,
I am building an ASMX web service, which interacts with a application on the host and send the response back.
Here I need to have customized response which also includes a log tag, which will be having all the debug information during the processing of a perticular web method. This will help us in debugging issues with out getting into the details of the web service code.
Can some one please point me to right direction or a good solution.
Thanks in advance.
Praveen.
Friday, August 16, 2013 7:38 AM
Answers
-
User-1662538993 posted
The one way of writing log is you can have an error class which you can include in response.
If everything is fine then just add success. If there is an error then add the exception to the error.
You can create log file and write everything to the log file.
Please check the following links-
http://forums.asp.net/t/1661558.aspx/1
http://www.codeproject.com/Articles/2344/Create-Simple-Error-Log-Files-using-ASP-NET-and-C
http://www.mindstick.com/Blog/458/How%20to%20Create%20Log%20File%20in%20C
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 16, 2013 11:02 AM -
User503812343 posted
You can use MessageContracts to customize your requrest and response. You can return the log conditionally or unconditionally attaching with response.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 20, 2013 11:29 AM
All replies
-
User-1662538993 posted
The one way of writing log is you can have an error class which you can include in response.
If everything is fine then just add success. If there is an error then add the exception to the error.
You can create log file and write everything to the log file.
Please check the following links-
http://forums.asp.net/t/1661558.aspx/1
http://www.codeproject.com/Articles/2344/Create-Simple-Error-Log-Files-using-ASP-NET-and-C
http://www.mindstick.com/Blog/458/How%20to%20Create%20Log%20File%20in%20C
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 16, 2013 11:02 AM -
User503812343 posted
You can use MessageContracts to customize your requrest and response. You can return the log conditionally or unconditionally attaching with response.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 20, 2013 11:29 AM