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).

Related podcasts

Events coming up

  • Mar 15

    DevWeek 2010

    London, United Kingdom

    DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET 4.0, Silverlight 3, WCF 4, Visual Studio 2010, REST, Windows Workflow 4, Thread Synchronization, ASP.NET 4.0, SQL Server 2008 R2, LINQ, Unit Testing, CLR & C# 4.0, .NET Patterns, WPF 4, F#, Windows Azure, ADO.NET, Entity Framework, Debugging, T-SQL Tips & Tricks, and more.

Want to stay in touch with what's going on? Follow us on twitter!