Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / August 2005

Tip: Looking for answers? Try searching our database.

Monitor IIS AppPool from ASP.NET web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Navin Mishra - 28 Jul 2005 19:27 GMT
Hi,

  How could I monitor IIS AppPool from the ASP.NET web service which is
hosted in that same AppPool ? I guess I could use WMI but I've not played
around with it. Is there an example code in ASP.NET for this need ? My
problem is Application_End is not being fired and so I want to trap when the
hosting AppPool recycles so that I could do properly cleamup.

Thanks in advance and regards

Navin
Clemens Reijnen - 30 Jul 2005 07:49 GMT
to use wmi in your c# files you have to use the System.Management namespace
and query voor the iis wmi-classes:

ManagementObjectSearcher Searcher = new ManagementObjectSearcher();
  ManagementScope Scope = new ManagementScope("root\\iis name have to look
for it");

  Searcher.Scope = Scope;
  SelectQuery Query = new SelectQuery();

  StringBuilder queryString = new StringBuilder();
  queryString.Append("SELECT * FROM bla bla");
etc
etc
etc

to find all the parameters and methods you can use cim-studio

greets clemens

> Hi,
>
[quoted text clipped - 8 lines]
>
> Navin
Navin Mishra - 02 Aug 2005 01:49 GMT
Thanks. A concrete example is appreciated for the newbie like me!

> to use wmi in your c# files you have to use the System.Management namespace
> and query voor the iis wmi-classes:
[quoted text clipped - 28 lines]
> >
> > Navin
Navin Mishra - 06 Aug 2005 01:09 GMT
Could it be happening because of multiple asmx files in my web service ? In
a test web service in which there is a single ASMX file, Application_End is
being fired all right. But not when there are multiple asmx files ?

Thanks in advance and regards

> Thanks. A concrete example is appreciated for the newbie like me!
>
[quoted text clipped - 33 lines]
> > >
> > > Navin

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.