
Signature
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
> Hi;
>
[quoted text clipped - 13 lines]
>
> any ideas?
What OS are you runing this on? Note that the WMI provider is not available on XP (IIS 5.1)
nor is the SMTP service, as such you won't find the IIsSmtpDomainSetting namespace.
> Also, the url you gave me says C# code should use System.DirectoryServices.
> Is that left over from .NET 1.1 times?
No it's not framework related, the WMI provider needs IIS6 and higher, the ADSI provider is
usable for IIS5 and (limitted support) IIS6 (W2K3 SP1 and XP SP2).
> And finally, this has to work on IIS 5 as well as IIS 6 as some of our
> customers will be using W2K or WinXP. It looks like some (all?) of the WMI
> API is limited to IIS 6.
Full support for WMI is only available starting from IIS6, for lower versions you'll need
ADSI (System.DirectoryServices). Note also that W2K is end of life, and XP's IIS 5.1 doesn't
support all of IIS6 and higher functionality.
That's why I recommend the System.Management (WMI provider interface) namespace, ADSI is no
longer updated to support the latest IIS versions.
The IIS 6 WMI provider stuff is found here:
http://msdn2.microsoft.com/en-us/library/ms525265.aspx
While the ADSI stuff is here:
http://msdn2.microsoft.com/en-us/library/ms524997.aspx
Note that for all WMI provider interface testing you should use CIMstudio (part of the WMD
SDK) or wbemtest.exe, learn to use these tools before you even try to implement something in
code.
Willy.