Skip to content

Commit

Permalink
Updates the install and uninstall transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Philo committed Aug 15, 2016
1 parent 5a17670 commit 3db06a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/Sitemapify/content/web.config.install.xdt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@
</xs:complexType>
</xs:element>
</xs:schema>

<system.web xdt:Transform="InsertIfMissing">
<httpHandlers xdt:Transform="InsertIfMissing">
<add verb="GET" path="sitemap.xml" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" xdt:Transform="InsertIfMissing" xdt:Locator="Condition(@path='sitemap.xml')"/>
</httpHandlers>
</system.web>

<system.webServer xdt:Transform="InsertIfMissing">
<handlers xdt:Transform="InsertIfMissing">
<remove name="Sitemapify" xdt:transform="InsertIfMissing" xdt:locator="Match(name)" />
<add name="Sitemapify" verb="GET" path="sitemap.xml" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" xdt:transform="InsertIfMissing" xdt:locator="Match(name)" />
<remove name="Sitemapify" xdt:Transform="InsertIfMissing" xdt:Locator="Condition(@name='Sitemapify')"/>
<add name="Sitemapify" verb="GET" path="sitemap.xml" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" xdt:transform="InsertIfMissing" xdt:locator="Condition(@name='Sitemapify')" />
</handlers>
</system.webServer>
</configuration>
6 changes: 3 additions & 3 deletions src/Sitemapify/content/web.config.uninstall.xdt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<system.webServer>
<handlers>
<add name="Sitemapify" verb="GET" path="sitemap.xml" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" xdt:transform="Remove" xdt:Locator="Match(name)" />
<add name="Sitemapify" verb="GET" path="sitemap.xml" type="Sitemapify.SitemapifyHttpHandler, Sitemapify" xdt:transform="Remove" xdt:Locator="Condition(@name='Sitemapify')" />
</handlers>
<handlers xdt:Locator="Condition(count(*) = 0)" xdt:Transform="Remove" />
<handlers xdt:Locator="Condition(count(*) = 0)" xdt:Transform="RemoveAll" />
</system.webServer>
<system.webServer xdt:Locator="Condition(count(*) = 0)" xdt:Transform="Remove" />
<system.webServer xdt:Locator="Condition(count(*) = 0)" xdt:Transform="RemoveAll" />

</configuration>

0 comments on commit 3db06a6

Please sign in to comment.