I am facing a strange issue with MVC Sitemap. At present I had maximum of of 3 levels of sitemap link which may change in future. The problem is the middle level sitemap link is not working (clicking on the link throwing error - Http 403.1 Forbidden) when I am at the next level but the base level is working. It has found that URL is not proper, like the Area and Contoller name is only popping up the action name missed out.
EG: Home>Company>Add
When on Add screen (final level), - clicking on Home redirects to localhost:xxxx/Home/index and working fine.
clicking on Company redirects to localhost:xxxx/Company/Company where it is expected to redirect to localhost:xxxx/Company/Company/index
and results in following error,
localhost:xxxx/Company/Company/
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. Most likely causes: •A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
The MVC.Sitemap details is as follows,
<?xml version="1.0" encoding="utf-8" ?>
<mvcSiteMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
xsi:schemaLocation="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0 MvcSiteMapSchema.xsd">
<mvcSiteMapNode key="Home" title="Home" controller="Home" action="Index">
<mvcSiteMapNode key="Company" title="Company" area="Company" controller="Company" action="Index">
<mvcSiteMapNode key="CompanyAdd" title="Add Company" area="Company" controller="Company" action="Add" />
</mvcSiteMapNode>
</mvcSiteMapNode>
</mvcSiteMap>