<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>IIS7 - General</title><link>http://forums.iis.net/1041.aspx</link><description>For any general questions relating to IIS 7</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908823.aspx</link><pubDate>Wed, 01 Jul 2009 07:35:37 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908823</guid><dc:creator>surion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908823.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908823</wfw:commentRss><description>&lt;p&gt;Thx :D&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908767.aspx</link><pubDate>Tue, 30 Jun 2009 16:58:48 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908767</guid><dc:creator>CarlosAg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908767.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908767</wfw:commentRss><description>&lt;p&gt;As the error indicates the Remove method does not return a value, you should do:&lt;/p&gt;
&lt;p&gt;Dim serverManager As ServerManager = New ServerManager&lt;/p&gt;
&lt;p&gt;Dim MySite As Site = serverManager.Sites(&amp;quot;test.fr&amp;quot;)&lt;/p&gt;
&lt;p&gt;serverManager.Sites.Remove(MySite)&lt;/p&gt;
&lt;p&gt;serverManager.CommitChanges()&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908729.aspx</link><pubDate>Tue, 30 Jun 2009 10:49:20 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908729</guid><dc:creator>surion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908729.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908729</wfw:commentRss><description>&lt;p&gt;Dim serverManager As ServerManager = New ServerManager&lt;/p&gt;&lt;p&gt;Dim MySite As Site = serverManager.Sites(&amp;quot;test.fr&amp;quot;)&lt;/p&gt;&lt;p&gt;Dim tata As SiteCollection = serverManager.Sites.Remove(MySite)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;serverManager.Sites.Remove(MySite) return me an error : Expression does not produce a value.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908707.aspx</link><pubDate>Tue, 30 Jun 2009 09:07:44 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908707</guid><dc:creator>qbernard</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908707.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908707</wfw:commentRss><description>&lt;p&gt;Try -&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.web.administration.sitecollection.remove.aspx"&gt;http://msdn.microsoft.com/en-us/library/microsoft.web.administration.sitecollection.remove.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908689.aspx</link><pubDate>Tue, 30 Jun 2009 07:08:09 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908689</guid><dc:creator>surion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908689.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908689</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39;ve to make an intranet to add and delet websites. The code must be in VB.Net ... i&amp;#39;m make the code for add a website, but i don&amp;#39;t know how to delet it from IIS7.0&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908603.aspx</link><pubDate>Mon, 29 Jun 2009 15:53:57 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908603</guid><dc:creator>krolson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908603.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908603</wfw:commentRss><description>&lt;p&gt;Is there a specific reason that you can&amp;#39;t use .vbs scripts with WMI to delete the site (the reference in the previous post does have a delete example for this)?&amp;nbsp;&amp;nbsp;I don&amp;#39;t have a lot of experience in this area,&amp;nbsp;but it seems that using scripts or appcmd would allow you to programmatically delete a site. What is it that you are trying to accomplish?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908597.aspx</link><pubDate>Mon, 29 Jun 2009 15:37:25 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908597</guid><dc:creator>surion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908597.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908597</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;look a example of my class IIS :&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim serverManager As ServerManager = New ServerManager&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim config As Configuration = serverManager.GetApplicationHostConfiguration&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sitesSection As ConfigurationSection = config.GetSection(&amp;quot;system.applicationHost/sites&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sitesCollection As ConfigurationElementCollection = sitesSection.GetCollection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ValeurDeCheck As Boolean = CheckWebSiteExist(True, sitesCollection, &amp;quot;site&amp;quot;, &amp;quot;name&amp;quot;, _ClientWebSiteName)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ValeurDeCheck Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim toto As New ServerManager()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim tata As Site = toto.Sites.Add(_ClientWebSiteName, &amp;quot;http&amp;quot;, &amp;quot;*:80:www.&amp;quot; + _ClientWebSiteName, _FTP)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; toto.CommitChanges()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ObjErrorMessage = &amp;quot;Error in check addWebSiteInIIS()&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;this code create a website, and i don&amp;#39;t found the code to delet it :/ &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908593.aspx</link><pubDate>Mon, 29 Jun 2009 15:24:55 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908593</guid><dc:creator>krolson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908593.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908593</wfw:commentRss><description>&lt;p&gt;There are a few ways to delete a web site using IIS 7.0.&lt;/p&gt;
&lt;p&gt;For example, this page outlines how to delete a website&amp;nbsp;using WMI (under the 6. Delete a Site section):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://learn.iis.net/page.aspx/162/managing-sites-with-iis-7039s-wmi-provider/"&gt;http://learn.iis.net/page.aspx/162/managing-sites-with-iis-7039s-wmi-provider/&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This page explains how to use appcmd.exe to delete a site (under the Manipulating Objects with ADD, SET, and DELETE section):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe/"&gt;http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may also delete a site using the UI (inetmgr). &lt;/p&gt;</description></item><item><title>Delet WebSite whis Microsoft.Web.Administration</title><link>http://forums.iis.net/thread/1908569.aspx</link><pubDate>Mon, 29 Jun 2009 13:14:56 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1908569</guid><dc:creator>surion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1908569.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1041&amp;PostID=1908569</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi all,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m trying to delet a website on IIS 7.0 on a 2008 server R2, and i don&amp;#39;t know how to do that :/ &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thx all for your help :) &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>