How to...

Installation and configuration

Installation
The Subgurim SiteMap installation is as easy as it is for any other librery.
  1. Download your preferred Subgurim SiteMap version (we suggest the newest one).
  2. Paste the ".dll" to your "~/bin" directory.
Important: The Subgurim SiteMap only works on ASP.NET 2.0 and later.

Configuration
Now we have to lightly configure our web.config
Let's start addind an HttpModule that points to the SubgurimSiteMap:

<system.web>
   <httpModules>
     <add name="SubgurimSiteMapContextRequest" type="Subgurim.Controles.SSM.SubgurimSiteMapContextRequest"/>
   </httpModules>
</system.web>


Now we have to add an item inside the "configSections" element:

<configSections>
   <section name="SubgurimSiteMapConfiguration" type="Subgurim.Controles.SSM.SubgurimSiteMapSectionHandler"/>
</configSections>


And finally, we will add the next non-predefined element. It has configuration purpuses and we will explain on the next "How To" Y finalmente, añadirmos ese elemento "No predefinido" del que hablábamos. Desde éste haremos unas configuraciones básicas que explicaremos en el próximo artículo explicativo. So we should add:

<SubgurimSiteMapConfiguration>
   <dataPath>...</dataPath>
   <sitemapResponse>...</sitemapResponse>
   <forbiddenPaths>
     <Path></Path>
   </forbiddenPaths>
   <acceptedExtensions>
     <extension>...</extension>
   </acceptedExtensions>
   <rewriterRules>
     <rule>
       <oldPath>...</oldPath>
       <newPath>...</newPath>
     </rule>
   </rewriterRules>
</SubgurimSiteMapConfiguration>


And that's all!
Let's see a complete web.config with the required upgrades::

<web.config>
  <configSections>
     <section name="SubgurimSiteMapConfiguration" type="Subgurim.Controles.SSM.SubgurimSiteMapSectionHandler"/>
  </configSections>

  <SubgurimSiteMapConfiguration>
     <dataPath>...</dataPath>
     <sitemapResponse>...</sitemapResponse>
     <forbiddenPaths>
       <Path></Path>
     </forbiddenPaths>
     <acceptedExtensions>
       <extension>...</extension>
     </acceptedExtensions>
     <rewriterRules>
       <rule>
         <oldPath>...</oldPath>
         <newPath>...</newPath>
       </rule>
     </rewriterRules>
  </SubgurimSiteMapConfiguration>

  <system.web>
     <httpModules>
       <add name="SubgurimSiteMapContextRequest" type="Subgurim.Controles.SSM.SubgurimSiteMapContextRequest"/>
     </httpModules>
  </system.web>
</web.config>