How to handle error while project running on live
Answers were Sorted based on User's Feedback
Its very essential to track the error in the live server.
When end user use the project, some error may come on live
server. We can use the an email id to capture them in the
exception block and sends them email.
try
{
----
----
----
}
catch(Exception oEx)
{
MailMessage oMM = new MailMessage();
oMM.To ="skumaar_mca@yahoo.com";
oMM.Subject = oEx.ToString();
StringBuilder oSB = new StringBuilder();
oSB.Append("Browser:"+Request.Browser);
oSB.Append("Url:"+Request.Url);
oSB.Append("IP Address:"+Request.UserHostAddress);
oSB.Append("Error:"+oEx.Message());
oMM.Body = oSB.ToString();
SmtpClient.Send(oMM);
This is sample coding for how to capture in the liver server.
No need to the write the above piece of coding in the every
place.
Just create an project and put the code in that class.
We can use the error message to that class and we can send
the email from there.
}
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sandeep
Only using application error log file and to show internal
server error
Is This Answer Correct ? | 0 Yes | 1 No |
Can you please anyone explain in detailed Webservices concepts in Asp.net?
Write a code for "RequiredFieldValidator" in java script
What is the difference between Session and response.Redirect?
Hi! Could any 1 please suggest me a free practice online exam for asp.net exams.. thanks
which scripting is used browser by server when we use validation controls. 1.javascript 2.vbscript 3.jscript 4.perl
Explain the differences between Server-side and Client-side code?
12 Answers Cognizant, CTS, Siebel Systems, Visual Soft,
What combination of methods are used to improve the speed of the fill() method of the DataAdapter? a) BeginFillData() and EndFillData() b) StartFillData() and EndFillData() c) BeginLoadData() and EndLoadData() d) StartLoadData() and EndLoadData()
2 Answers Syntax Softtech, winfoware,
What are the advantages and disadvantages of viewstate ?
Why is global asax is used?
Why Global.asax is used?
How is session id generated?
What is an assembly? Explain its parts.