Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?

0 Answers  


How many no of classes in .net

4 Answers  


what are the Custom controls in asp.net?

0 Answers   MCN Solutions,


what is machine key error in asp.net? how to solve it?

1 Answers  


what is diference between the .net1.0 & .net2.0 ?

3 Answers   EMax,


Is it possible to use two versions of assembly at the same time?If possible explain with code?

3 Answers   Tech Mahindra,


Details on web.config and global.asax - just explain what are the sections will be there.

1 Answers   Syntel,


What is a runtime version?

0 Answers  


Suggest 3 best practices in detail for for Developing High Performance Web and Enterprise Applications

2 Answers   Techno Solutions,


WHAT IS THE SEQUENCE IN WHICH ASP.NET EVENTS IS PROCEED?

4 Answers  


What are the various security methods which IIS Provides apart from .NET ?

1 Answers  


How can we apply themes to an asp.net application?

0 Answers  


Categories