تقييمات الطلاب
( 5 من 5 )
١ تقييمات
فيديو شرح Windows event viewer Part 72 ضمن كورس ASP.net شرح قناة kudvenkat، الفديو رقم 72 مجانى معتمد اونلاين
Text version of the video
http://csharp-video-tutorials.blogspot.com/2012/12/windows-event-viewer-part-72.html
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation1
Slides
http://csharp-video-tutorials.blogspot.com/2013/08/part-72-windows-event-viewer.html
All ASP .NET Text Articles
http://csharp-video-tutorials.blogspot.com/p/free-aspnet-video-tutorial.html
All ASP .NET Slides
http://csharp-video-tutorials.blogspot.com/p/aspnet-slides.html
All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view1&sortdd
All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists
Exceptions in an asp.net web application can be logged to the event viewer. First let us discuss about the event viewer and create custom event log and event source. To access the event viewer
1. Click on Start
2. Type "Run" and press enter
3. In the "Run" window typpe "eventvwr" and press enter
4. This should open up event viewer
Under windows logs, you should see
1. Application - Logs information from applications like MS Office, SQL Server, Visual Studio etc.
2. Security - Logs information related to security like user sign-ons, access checks etc
3. System - Logs information related to driver, system service failures etc.
Let us now create a windows application that can be used to create a custom windows event log and event source. The Event Source is the name of the application that logged the event. The event source is displayed in the details pane, when an event is selected in the event viewer.
Steps to create the windows application to create the custom windows event log and event source.
1. Drag and drop two textboxes, two labels, and a button control on to the windows form
2. Arrange the controls, so the form looks as shown below.
//Custom Event Logs in event viewer
3. Double click the button control to generate the event handler
4. Copy and paste the following code in the click event handler
private void CreateEventLogButton_Click(object sender, EventArgs e)
{
if (EventLogNameTextBox.Text ! string.Empty && EventLogSourceTextBox.Text ! string.Empty)
{
System.Diagnostics.EventLog.CreateEventSource
(EventLogSourceTextBox.Text, EventLogNameTextBox.Text);
MessageBox.Show("Event Log and Source Created");
}
else
{
MessageBox.Show("Event Log and Source are required");
}
}
5. Run the application
6. Enter the name and source for the event log.
7. Click "Create Event Log and Event Source Button" button
Open the event viewer. The newly created "event log" should be under Applications and Service Logs. If you are not able to locate them, restart your machine.
To delete the custom event log, use the Delete() method
System.Diagnostics.EventLog.Delete("EventLogNameToDelete")