Use Multiple Sitemap file in ASP.NET Problem
-
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.
-
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.
This is case sensitive. Use
siteMapFile
instead ofsitemapfile
. Please remove the posts below as well.Deja View - the feeling that you've seen this post before.
-
This is case sensitive. Use
siteMapFile
instead ofsitemapfile
. Please remove the posts below as well.Deja View - the feeling that you've seen this post before.
It's working. Thank you