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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can action method static?

993


Fetch one page value to another page without using state-managment ?

853


code for "For every 5days system has to create 1text file with the corresponding date and it has to store in c-drive" by using web applications

1796


What is asp.net master page?

931


Describe paging in asp.net?

1098


How to create events for a control?

966


Explain why it is useful to use mvc instead of webforms? : asp.net mvc

987


What are the modes of updation in an updatepanel?

913


Which of the following .NET framework supports Web API?

1030


What are the page life cycle events?

856


explain code with multi inhertance

2044


What is Cookies Less Session?

989


Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?

1214


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

973


How does u get record no from 5 to 15 from a dataset of 100 records?

907