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 |
Explain how do you validate the controls in an asp .net page?
How do you handle session management in ASP.NET and how do you implement them. How do you handle in case of SQLServer mode ?
What is asp.net and how it works?
How To Call Outside Javascript File? Example : Our Project File Folder Name "Sample" Another Folder Name "Check".Check Folder Is Out Side Of Our Project ?Check Folder Have Verify.Js File. My Question Is How To Call Verify.Js File.
3 Answers Consagous, Phoenix Technologies,
What are sharepoint pages?
Please briefly explain the usage of global.asax?
Where on the Internet would you look for Web services?
5 Answers IBM, MNC, Siebel Systems,
What are the features of asp net?
How about the security in Activex DLL and Activex EXE ?
COM+ Used ________________ Isolation Level
What is the difference between union and join?
Where the assembly is stored in asp.net?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)