Library code snippets

Health Monitoring in ASP.NET 2

Event Class

  

#Region " Declarations "
Public NotInheritable Class [Event]
        Dim _EventID As String
        Dim _EventTimeUtc As Date
        Dim _EventTime As Date
        Dim _EventType As String
        Dim _EventSequence As Decimal
        Dim _EventOccurrence As Decimal
        Dim _EventCode As Integer
        Dim _EventDetailCode As Integer
        Dim _Message As String
        Dim _ApplicationPath As String
        Dim _ApplicationVirtualPath As String
        Dim _MachineName As String
        Dim _RequestUrl As String
        Dim _ExceptionType As String
        Dim _Details As String
#End Region

#Region " Properties "

        Public Property EventID() As String
            Get
                Return _EventID
            End Get
            Set(ByVal value As String)
                _EventID = value
            End Set
        End Property

        Public Property EventTimeUtc() As Date
            Get
                Return _EventTimeUtc
            End Get
            Set(ByVal value As Date)
                _EventTimeUtc = value
            End Set
        End Property

        Public Property EventTime() As Date
            Get
                Return _EventTime
            End Get
            Set(ByVal value As Date)
                _EventTime = value
            End Set
        End Property

        Public Property EventType() As String
            Get
                Return _EventType
            End Get
            Set(ByVal value As String)
                _EventType = value
            End Set
        End Property

        Public Property EventSequence() As Decimal
            Get
                Return _EventSequence
            End Get
            Set(ByVal value As Decimal)
                _EventSequence = value
            End Set
        End Property

        Public Property EventOccurrence() As Decimal
            Get
                Return _EventOccurrence
            End Get
            Set(ByVal value As Decimal)
                _EventOccurrence = value
            End Set
        End Property

        Public Property EventCode() As Integer
            Get
                Return _EventCode
            End Get
            Set(ByVal value As Integer)
                _EventCode = value
            End Set
        End Property

        Public Property EventDetailCode() As Integer
            Get
                Return _EventDetailCode
            End Get
            Set(ByVal value As Integer)
                _EventDetailCode = value
            End Set
        End Property

        Public Property Message() As String
            Get
                Return _Message
            End Get
            Set(ByVal value As String)
                _Message = value
            End Set
        End Property

        Public Property ApplicationPath() As String
            Get
                Return _ApplicationPath
            End Get
            Set(ByVal value As String)
                _ApplicationPath = value
            End Set
        End Property

        Public Property ApplicationVirtualPath() As String
            Get
                Return _ApplicationVirtualPath
            End Get
            Set(ByVal value As String)
                _ApplicationVirtualPath = value
            End Set
        End Property

        Public Property MachineName() As String
            Get
                Return _MachineName
            End Get
            Set(ByVal value As String)
                _MachineName = value
            End Set
        End Property

        Public Property RequestUrl() As String
            Get
                Return _RequestUrl
            End Get
            Set(ByVal value As String)
                _RequestUrl = value
            End Set
        End Property

        Public Property ExceptionType() As String
            Get
                Return _ExceptionType
            End Get
            Set(ByVal value As String)
                _ExceptionType = value
            End Set
        End Property

        Public Property Details() As String
            Get
                Return _Details
            End Get
            Set(ByVal value As String)
                _Details = value
            End Set
        End Property
#End Region

End Class

Comments

  1. 22 May 2006 at 06:53

    Hi Mehdi Golchin,

    Thanks for you guide. I have successed to configure the aspnet_regsql.

     

    regard,
    Jason

  2. 21 May 2006 at 18:39

    Hi Jason,
    Health monitoring uses SQL Server for storing web events. so you must add health monitoring's tables and stored procedures. for that you have tow solutions. you can use aspnet_regsql command in visual studio command prompt or if you like to create a installation page for your project you can use
    that code which generates health monitoring's tables and stored procedures as run-time.

  3. 21 May 2006 at 15:48

    Dear Mehdi Golchin,

    With regard to your Step 1, can you please explain more in details "run-time mode". As i do not know where to install it Many thanks...

    Step 1 : Installing Web Event
    You can do this easily in run-time mode with this code below:

    Management.SqlServices.Install("Computer Name", "SQL user name",
    "SQL password", "Database name", Management.SqlFeatures.

    SqlWebEventProvider)

     
    Regard,
    Jason

  4. 01 Jan 1999 at 00:00

    This thread is for discussions of Health Monitoring in ASP.NET 2.

Leave a comment

Sign in or Join us (it's free).

AddThis

Related podcasts

  • CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly Media

    CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly MediaHosts Ken Levy and Markus Egger discuss the new State of .NET events, IE8, ASP.NET MVC, followed by an interview from PDC with two editors from O'Reilly Media. More on ASP.NET MVC can be found at http://asp.net/mvc. Interview...

Related jobs

Events coming up

  • Dec 9

    Internet Information Services 7.0 for ASP.Net Developers

    Glasgow, United Kingdom

    One of the biggest and best new features of Windows Server 2008 and Windows Vista is Internet Information Server 7.0.  IIS 7.0 is the latest and most significant release of Microsoft's Web Server. With this release comes a new extensibility model which gives developers more options than ever before, more diagnostic tools with which developers can debug and locate issues. During the session Andrew will investigate the new architecture, look at extending, configuring and developing for IIS7, ta...