471,356 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

WMI for IIS on w2003

I wrote a monitoring program for IIS servers ( each Site under the IIS
/service/ is known as a *server* ).

This code (below) works on w2k, but not on w2003 and I think it might
just be naming conventions.

In w2k, each new site is indexed in active directory like:

In w2003 that doesn't seem to be the case. For one thing, if I look in
the logFiles directory, I see that the first service is labelled
W3SVC/1, but the next one is labelled W3SVC/2nnnnnn..., likewise, the
next is labelled W3SVC/3nnnnnnnn...

When I run my code using either W3SVC/2 or the extended number I see in
LogFiles, it errors and says "not found".

How can I control my additional sites from WMI using .NET?

using System;
using System.DirectoryServices;

namespace Webeye
/// <summary>
/// Summary description for iism2m.
/// </summary>
public class iism2m

DirectoryEntry _root;
public iism2m(string _serverName)
// TODO: Add constructor logic here

_root = new DirectoryEntry("IIS://localhost/"+_serverName);


public void start()
_root.Invoke("start"); // and start

public void stop()
_root.Invoke("stop"); // stop


Jul 22 '05 #1
0 1077

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by fake | last post: by
2 posts views Thread by Wernfried Schwenkner | last post: by
4 posts views Thread by DraguVaso | last post: by
reply views Thread by jabailo | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.