473,320 Members | 1,612 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,320 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 1142

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.