iis 7 - WMI access to IIS7 -
we have internal tool enumerates iis sites , applications server. uses code similar this:
using (var servermanager = servermanager.openremote(servername)) { var site = servermanager.sites[sitename]; // slow // , starting enumerate applications incredibly slow foreach (var application in site.applications) { // ... } }
the problem i'm having when sites
collection accessed, response time slow when connecting server on our vpn. accessing applications site slower. theory slowness caused fact entire set of metadata sites sent on wire. however, need subset of site data.
my theory if switched code using wmi queries, i'd able query specific fields concern application (like select name site
). unfortunately, when trying explore wmi objects in wmi cim studio, local iis 7.5, none of objects i'd expect present, site
, application
objects. i'm using root\webadministration
namespace.
does of wmi stuff work iis 7.5? ensured "iis 6 wmi compatibility" turned on. there alternative lightweight ways query metadata iis instance?
you can manage iis 7.5 via wmi , simplest wql query
select name site
output list of available sites. see "managing sites iis 7.0's wmi provider".note: if intend use scripts iis6, may required rewrite them. scripts iis6 won't work iis7 because methods in wmi provider of iis 6 , iis7 different.
you can start cim studio way:
- share
c:\program files (x86)\wmi tools
on network , set read / write access account share. - start ie , enter
\\hostname\wmi tools\studio.htm
url.
- share
if still can't start wmi studio, use
wbemtest
tool exploreroot\webadministration
namespace.
Comments
Post a Comment