473,657 Members | 2,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

healthMonitorin g

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:

<healthMonitori ng enabled="true" heartbeatInterv al="0">
<rules>
<add name="Log Web Requests" provider="Event LogProvider" eventName="Requ est
Processing Events" minInstances="1 " maxLimit="Infin ite" custom="" />
</rules>
</healthMonitorin g>

The provider and event names shown are from the web.config found in the .Net
2.0 distribution
(\windows\micro soft.net\framew ork\v2.0.50727\ config\web.conf ig).

..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 2056
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 <eventMapping s> and <rules>
elements. .e.g:

<healthMonitori ng>
<eventMapping s>
<add name="My Critical Event" type="WALib.MyC riticalEvent,WA Lib"/>
</eventMappings>
<rules>
<add name="Critical Event Rule" eventName="My Critical Event"
provider="Event LogProvider"/>
</rules>
</healthMonitorin g>

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.W ebExtendedBase + 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.Mana gement 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******** ******@TK2MSFTN GXA01.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 <eventMapping s> and <rules>
elements. .e.g:

<healthMonitori ng>
<eventMapping s>
<add name="My Critical Event" type="WALib.MyC riticalEvent,WA Lib"/>
</eventMappings>
<rules>
<add name="Critical Event Rule" eventName="My Critical Event"
provider="Event LogProvider"/>
</rules>
</healthMonitorin g>

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.W ebExtendedBase + 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
1120
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> <authorization>
1
1868
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 -------------- using System; using System.Web.Management;
1
1608
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' or one of its dependencies" error messege on compilation/deployment. Here's the config, from the web.config: <healthMonitoring enabled="true">
1
1476
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
920
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 healthmonitoring adds to the log instead of the less descriptive message that System.Diagnostics.EventLog.WriteEntry("MyApp", "Error Message to Display"); provides.
0
834
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 in the error message details about each and every session object, it does this by first testing system.web.httpcontext.current != null then testing whether the session object off the current context is not null, then iterates through the objects.
0
910
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 to write any error handling code. The only catch is that the document http://msdn2.microsoft.com/en-us/library/zaa41kz1.aspx is not correct for <provider(of SimpleMailWebEventProvider Provider): 1. "from" is optional and will inherit from SMTP...
2
2180
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 those information. I know those information are available somewhere because when I add it as a counter to the performance monitor, I manage to get those information. Is there a way to get that information within the code in order for me
1
2236
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 configured ASP.NET health monitoring providers. This has proven to be a good solution for us over the 3 years the application has been in production. Our application has logic that fires in the Global.asax Application_Start event, and that logic also...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.