So we dim up a trace
context record object which we could do within the forage as well and then look
through the collection of trace records and output information about each
basically just outputting that category and the message so that had run this
application you can see that you get information about all of the events that
fired as part of this page as well as the custom trace message that we output
from the pages load event procedure instead of displaying the output on the
page could also directed to an external source such as a database and in this.
Way you can create the equivalent of your own trace listener without using
system.diagnostics one of the channel providers that you can use to monitor
application health saves data to a SQL Server database is a great option
because he can send a lot of information and it makes it easily available and
has a lot of failover features as well the first step in setting up monitoring
is to create the application services database for SQL Server for some services
it makes sense to place this data in the app data folder in your application
directory that uses SQL express but for event data you probably want to use a
single central database as a mentor to look at doing in this example can be
pretty tedious to set up a database by yourself.
Say ASP.net provides an ASP.net
_ red SQL utility this is part of the.net framework you can use this to create
the SQL Server database or to configure options for an existing one and you can
find this utility in the Windows/Microsoft.net/framework version number folder
on your computer as a couple different ways to run this utility you can run
from the command line or you can run it as a Windows wizard application was
sickle look at running the wizard the easiest way to run the utility is by
using the Visual Studio command prompt this is nice because in early has all
the path set up to the various utilities used by the.net framework and Visual
Studio rights of the wizard is running out click on the next button and it
prompts me for what I wanted to go to configure SQL Server for application
services.
But I can also remove the services if I want to take them away from
his computer click on next and in this case I'm going to use the SQL express
instance on this machine all connected using Windows authentication and only if
the default database selection because I will create a new database on click on
next and gives me a summary of what is going to do and I'll click on next and
I'll take care of configuring the database I think evidence the database is
been created or modified right all click out of the wizard and shut down the
command prompt and were all set to start saving health information to that
database the one other thing.
0 comments:
Post a Comment