473,395 Members | 1,379 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,395 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:

W3SVC/1
W3SVC/2
....
W3SVC/n
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);
//"/W3SVC/1");

}

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

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

}

}
Jul 22 '05 #1
0 1148

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

Similar topics

3
by: Fabienne | last post by:
I've to migrate website from IIS 2.0 to IIS 6.0. Simple asp pages are working, but pages with visual interdev 6.0 controls not work ! HTTP 500 (internal server error) Visual Interdev 6.0 is it...
0
by: fake | last post by:
aloha, i have one question. We have installed oracle DB 9i on server which is running on W2003 server os. Instalation of server was not our problem because that is job of other firm. After...
2
by: Wernfried Schwenkner | last post by:
On my machine (W2003) I had Sharepoint portal server running, just the default settings after setup together with .NET 2003. Now I tried out to install Whidbey. Thenafter the Sites from SPPS...
4
by: DraguVaso | last post by:
Hi, I need to know the different performance and possiblities of VB.NET on Windows 97, Windows 2000 and Windows 2003. I guess that VB.NET-applications on a W2003 should work better, but where is...
0
by: Ken | last post by:
Hi, We have a component that we've used successfully under W2000 to create virtual directories on an IIS 5.0 web server. We're in the process of upgrading to W2003 and I'm now encountering an...
1
by: hb | last post by:
Hi, I move one off our Asp.Net web site from Windows 2000 Server to a Windows 2003 Server. The way I did is copy whole site to the new server and create a new web site pointed to the folder. ...
0
by: Volker Schmid | last post by:
Hi, I'm an ASP beginner and did an application here locally on my IIS under W2000 Prof (SP4) . Runs here completely great. Now I wanted to place this application under a W2003 server online....
0
by: jabailo | last post by:
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...
0
by: gabivigo | last post by:
Hello, I have just developed a web service. If I check it by browsing the asmx file it works fine in w2000. But doing the same in the preproduction enviroment in w2003 it gives the error "File or...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.