473,385 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

healthMonitoring

I'm trying to set up health monitoring for web services and a web
application. To start very simply, I want to turn on event logging for web
requests. To do this I added the following markup to the <system.web>
section of the web.config file in the service and application directories:

<healthMonitoring enabled="true" heartbeatInterval="0">
<rules>
<add name="Log Web Requests" provider="EventLogProvider" eventName="Request
Processing Events" minInstances="1" maxLimit="Infinite" custom="" />
</rules>
</healthMonitoring>

The provider and event names shown are from the web.config found in the .Net
2.0 distribution
(\windows\microsoft.net\framework\v2.0.50727\confi g\web.config).

..Net 2.0 is installed, everything was built with VS '05, I'm accessing
everything through IE 6.0.

I'm not seeing any events show up in the log. What am I missing?

Thanks -

R
Feb 17 '06 #1
4 2044
Do you not need to actually raise some webevents? I have to admit that
I've not yet played with this new feature, but I did find these
resources:

http://weblogs.asp.net/Dr.NETjes/arc...09/279101.aspx
http://www.asp.net/QuickStart/aspnet...webevents.aspx

Good Luck and let us know how you get on.

Josh
http://www.thejoyofcode.com/

Feb 19 '06 #2
Thanks for Josh's inputs.

Hi russell,

As Josh has mentioned, when configuring the ASP.NET 2.0 health monitoring,
we specify both the events we want to monitor and how the events should be
logged or reported. These are done through the <eventMappings> and <rules>
elements. .e.g:

<healthMonitoring>
<eventMappings>
<add name="My Critical Event" type="WALib.MyCriticalEvent,WALib"/>
</eventMappings>
<rules>
<add name="Critical Event Rule" eventName="My Critical Event"
provider="EventLogProvider"/>
</rules>
</healthMonitoring>

After the configuration is ok, what we need to do is raise those certain
events in proper place in our web application's code. For example, in our
webservice's webmethod:

[WebMethod]
public string HelloWorld() {

MyCriticalEvent testEvent = new MyCriticalEvent(
"Critical Operation Performed",
this,
WebEventCodes.WebExtendedBase + 1);
testEvent.Raise();

return "Hello World";
}
#How To: Use Health Monitoring in ASP.NET 2.0
http://msdn.microsoft.com/library/en...1.asp?frame=tr
ue#paght000011_step1

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 20 '06 #3
In the immortal words of Homer Simpson -- "D'oh!".

Somehow I came away from reading the docs with the impression that event
types defined in System.Web.Management would be raised automatically. My
error!

I created a very simple custom event, raised it in my code, and it shows up
as expected.

The health monitoring stuff is very nice, I'm looking forward to integrating
it into our apps.

Thanks!

R
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:cE**************@TK2MSFTNGXA01.phx.gbl...
Thanks for Josh's inputs.

Hi russell,

As Josh has mentioned, when configuring the ASP.NET 2.0 health monitoring,
we specify both the events we want to monitor and how the events should be
logged or reported. These are done through the <eventMappings> and <rules>
elements. .e.g:

<healthMonitoring>
<eventMappings>
<add name="My Critical Event" type="WALib.MyCriticalEvent,WALib"/>
</eventMappings>
<rules>
<add name="Critical Event Rule" eventName="My Critical Event"
provider="EventLogProvider"/>
</rules>
</healthMonitoring>

After the configuration is ok, what we need to do is raise those certain
events in proper place in our web application's code. For example, in our
webservice's webmethod:

[WebMethod]
public string HelloWorld() {

MyCriticalEvent testEvent = new MyCriticalEvent(
"Critical Operation Performed",
this,
WebEventCodes.WebExtendedBase + 1);
testEvent.Raise();

return "Hello World";
}
#How To: Use Health Monitoring in ASP.NET 2.0
http://msdn.microsoft.com/library/en...1.asp?frame=tr
ue#paght000011_step1

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 21 '06 #4
Thanks for your followup Russell,

Glad that you've got it working. Enjoy ASP.NET 2.0 :)

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Feb 22 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: I am Sam | last post by:
In my web.config file I have placed the following settings: <authentication mode="Forms"> <forms name=".tqSecure" loginUrl="/Login.aspx" protection="All" timeout="80" /> </authentication>...
1
by: Anonieko | last post by:
Logging To a File In A S P . N E T 2 . 0 . I also want weekly rolling filename for the log file. Step 1. Create a class library ( 2 classes) ============================== AppWebEvent.cs...
1
by: Neil Billingham | last post by:
Hi, Has anyone experienced problems when deploying a web app via VS2005 with regards health monitoring configuration settings in the web.config? I get a "could not load file or assembly '__code'...
1
by: Bird | last post by:
Hi, By default, EventLogWebEventProvider is enabled. Can I disable it? (to avoid events written to Windows Event Log) Thanks!
0
by: robl | last post by:
I have a custom Eventlog created for my application that I would like healthmonitoring events to log to instead of the Applcation Event Log. I would prefer to have the additional information that...
0
by: Ian Powell | last post by:
Hi, I am developing a new health monitoring provider to handle exception errors for applications within my company. Ordinarily the code I use iterates through the session objects and reports...
0
by: Q. John Chen | last post by:
I am configure the healthMonitoring so all the errors are redirected as an email instead of EventLog. It is pretty simply to get it working. Great new feature for simple error handling - no need...
2
by: Dan | last post by:
Hello, I am using the Health Monitoring in asp.net 2.0 but came accross a problem. I want to get information such as request execution time, requests/sec, etc but the object doesn't expose me...
1
by: Howard Hoffman | last post by:
We've an ASP.NET 2.0 application that we're migrating to IIS7 and W2K8. We have application that makes heavy use of the System.Web.Management.WebErrorEvent type to Raise() errors to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.