The ServerManger class can do it.  See 
http://msdn.microsoft.com/en-us/library/microsoft.web.administration.servermanager(v=vs.90).aspx
 

Note:  It leaks memory like a sieve, and it's behavior is such that you'll be 
destroying and recreating it frequently (i.e., it doesn't appear truly possible 
to crank up an instance of it and just hit it with methods).  Also, you've got 
to parse the binding information (in the form ip:port:header except for net.tcp 
which is port:*) yourself.  And, when AppPool processing, you have to iterate 
over all the AppPools and select just the one(s) you want for processing.  But 
it works.

-----Original Message-----
From: Chad Petersen [mailto:chad.peter...@harlandfs.com] 
Sent: Friday, October 21, 2011 2:53 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Validating Web site in IIS7 - WiX 3.5

My CA also works fine if I install the IIS6 Compatibility Layer on
Win2008 R2 Server as the old GetObject method uses the Metabase. Was just 
hoping to avoid having to install that extra layer. Since we still have to 
support 2003 Server right now I need this older method still for that OS, but 
had planned on running that only on Win2003 and using some newer method with 
Win2008 that didn't require that Compat layer.
Thoughts?

-----Original Message-----
From: John Cooper [mailto:jocoo...@jackhenry.com]
Sent: Friday, October 21, 2011 12:22 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Validating Web site in IIS7 - WiX 3.5

I query the IIS6 Metabase Compatibility layer (the custom action hasn't been 
migrated to a pure IIS7 form using ServerManager ) to populate a ComboBox 
(which gets queried for the "Default Web Site" if the UI is suppressed).  In UI 
mode, A dialog box with the contents of the ComboBox is displayed.  The site 
selected by the user is then used to initialize a set of website properties 
(port, certificate, name, description, ip, header).  An additional dialog is 
then displayed to allow the user to override the default ports.  If the default 
ports are overridden, additional custom actions run to update the ports 
(particularly net.tcp).  In the non UI case, a custom action runs to harvest 
the UPN username and password off selected AppPools on the "Default Web Site".
Both this CA and the binding (port) CA's use the IIS7 ServerManager class.

--
John Merryweather Cooper
Jack Henry & Associates, Inc. (Premier Tech, Inc.) Build & Install Engineer - 
jXchange
Office:  913-341-3434 x791011
jocoo...@jackhenry.com




-----Original Message-----
From: Chad Petersen [mailto:chad.peter...@harlandfs.com]
Sent: Friday, October 21, 2011 1:48 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Validating Web site in IIS7 - WiX 3.5

Trying to figure out the right approach to validate that a Web site already 
exists during my install. In IIS6 I used
GetObject("IIS://localhost/w3svc") and queried that for the info the user typed 
in. Any of you that target IIS7+ how are you dealing with this? I am using a 
Web site locator for an existing Web site rather than creating my own Web site. 
I'd probably want to do this as a DoAction during my InstallUISequence.

Suggestions or code snippets would be great!

Thanks
Chad


------------------------------------------------------------------------
------
The demand for IT networking professionals continues to grow, and the demand 
for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco 
certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended exclusively for the individual or entity to which it is addressed. The 
message, together with any attachment, may contain confidential and/or 
privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution is strictly prohibited. If you have received this message in 
error, please immediately advise the sender by reply email and delete all 
copies.


------------------------------------------------------------------------
------
The demand for IT networking professionals continues to grow, and the demand 
for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco 
certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to