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

Describe the events in the life cycle of a web application.

0 Answers  


In asp.net, if a webpage seems too slow to load completely in th ebrowser. In this case what are the checkings or actions you will take to rectify the slowness or which are the factors related to this issue? How we can trace it?

3 Answers  


if you disable view state of a textbox will it maintain data during postbacks.if yes reason

9 Answers   FactorH, Jindal, Oxi Infotech,


What are the 3 levels at which content pages can be attached to Master Page?

0 Answers   MCN Solutions,


What is the difference between CLICK and MOUSE DOWN Event ?

0 Answers   MCN Solutions,






About delegates ?

7 Answers   TCS,


main difference between asp.net2.0,asp.net1.1,asp.net1.0

15 Answers   Inflexion, Infosys, iSoft, Microsoft, Prakruthi,


What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.

0 Answers   Siebel,


What is Partial in ASP.NET 2.0?

2 Answers   Fulcrum Logic,


How does a content page different from a master page?

0 Answers   MindCracker,


What is applicatio domain?

0 Answers   MCN Solutions,


What is inheritance and an how it be used, example with an example?

0 Answers   Siebel,


Categories