How to handle error while project running on live

Answers were Sorted based on User's Feedback



How to handle error while project running on live ..

Answer / tiger skumar

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

How to handle error while project running on live ..

Answer / sandeep

Only using application error log file and to show internal
server error

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

How does the browser enable AutoPostBack functionality?

2 Answers  


What is DTS package?

2 Answers   Accenture, TCS,


what are configuration files?

0 Answers  


what is diffrent between asp & asp.net

2 Answers  


How do you manage session in ASP and ASP.NET?

1 Answers   Microsoft,






If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?

7 Answers   Syntax Softtech,


Any disadvantages in Dataset and in reflection ?

1 Answers   DELL,


Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler?

1 Answers   Zenith,


What is an axd file?

0 Answers  


how to integrate Language conversion, without asking the enduser to download font, it should auto integrate

1 Answers  


Can i have both C# and vb.net code in same assembly?how?

5 Answers   Wipro,


How do you secure your connection string information?

0 Answers  


Categories