Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Use Multiple Sitemap file in ASP.NET Problem

Use Multiple Sitemap file in ASP.NET Problem

Scheduled Pinned Locked Moved C#
helpasp-nettutorialcsharpcom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SathyaSiva
    wrote on last edited by
    #1

    Hi, I am using two sitemaps.I wrote code like this web.sitemap <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="Default.aspx" title="" description="Home"> <siteMapNode url="Default.aspx" title="Computer" description="Computer" > <siteMapNode url="Default.aspx" title="Laptop" description="Laptop" /> <siteMapNode url="Default.aspx" title="Desktop" description="Desktop" /> </siteMapNode> </siteMapNode> </siteMap> web1.sitemap <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="User" description="User"> <siteMapNode url="" title="Forgot Password" description="Forgot Password" /> <siteMapNode url="" title="Change Password" description="Change Password" /> <siteMapNode url="" title="Login" description="Login" /> </siteMapNode> </siteMap> Web.config <siteMap enabled="true"> <providers> <add name="Example" type="System.Web.XmlSiteMapProvider" sitemapfile="~/Web.sitemap"/> <add name="Example1" type="System.Web.XmlsitemapProvider" sitemapfile="~/Web2.sitemap"/> </providers> </siteMap> .aspx page <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="Example" /> It showing following error Server Error in '/MultipleSitemap' Application. The attribute 'sitemapfile' is unexpected in the configuration of the 'Example' provider. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Configuration.ConfigurationErrorsException: The attribute 'sitemapfile' is unexpected in the configuration of the 'Example' provider. Source Error: [No relevant source lines] Source File: c:\Documents and Settings\system3\Local Settings\Temp\Temporary ASP.NET Files\multiplesitemap\85793d13\552d1a9d\App_Web_dbjhdcj7.0.cs Line: 0 How to solve this? anyone help me please.

    P 1 Reply Last reply
    0
    • S SathyaSiva

      Hi, I am using two sitemaps.I wrote code like this web.sitemap <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="Default.aspx" title="" description="Home"> <siteMapNode url="Default.aspx" title="Computer" description="Computer" > <siteMapNode url="Default.aspx" title="Laptop" description="Laptop" /> <siteMapNode url="Default.aspx" title="Desktop" description="Desktop" /> </siteMapNode> </siteMapNode> </siteMap> web1.sitemap <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="User" description="User"> <siteMapNode url="" title="Forgot Password" description="Forgot Password" /> <siteMapNode url="" title="Change Password" description="Change Password" /> <siteMapNode url="" title="Login" description="Login" /> </siteMapNode> </siteMap> Web.config <siteMap enabled="true"> <providers> <add name="Example" type="System.Web.XmlSiteMapProvider" sitemapfile="~/Web.sitemap"/> <add name="Example1" type="System.Web.XmlsitemapProvider" sitemapfile="~/Web2.sitemap"/> </providers> </siteMap> .aspx page <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="Example" /> It showing following error Server Error in '/MultipleSitemap' Application. The attribute 'sitemapfile' is unexpected in the configuration of the 'Example' provider. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Configuration.ConfigurationErrorsException: The attribute 'sitemapfile' is unexpected in the configuration of the 'Example' provider. Source Error: [No relevant source lines] Source File: c:\Documents and Settings\system3\Local Settings\Temp\Temporary ASP.NET Files\multiplesitemap\85793d13\552d1a9d\App_Web_dbjhdcj7.0.cs Line: 0 How to solve this? anyone help me please.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      This is case sensitive. Use siteMapFile instead of sitemapfile. Please remove the posts below as well.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      S 1 Reply Last reply
      0
      • P Pete OHanlon

        This is case sensitive. Use siteMapFile instead of sitemapfile. Please remove the posts below as well.

        Deja View - the feeling that you've seen this post before.

        My blog | My articles

        S Offline
        S Offline
        SathyaSiva
        wrote on last edited by
        #3

        It's working. Thank you

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups