I am unable to reproduce the issue, but I strongly suspect that it is due to the version mismatches you have between the MVC version you are targeting throughout your configuration. In root Web.config: <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> </compilation> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly>...
c#,twitter-bootstrap,asp.net-mvc-5,mvcsitemapprovider,mvcsitemap
node.Descendants should be node.Children Learn the difference on Descendants and Children here, CSS Child vs Descendant selectors (Never mind the post beeing about CSS, this is a generic pattern)...
c#,asp.net-mvc-4,mvcsitemap,mvcsitemapprovider,asp.net-mvc-sitemap
Your approach is likely causing you to create more nodes than you need. Unless it is important to index your CRUD operations in search engines, there is a shortcut. You can use a single set of nodes for "Index", "Create", "Edit", "Delete", "Details" and use preservedRouteParameters to force them to...
asp.net-mvc,mvcsitemapprovider,mvcsitemap,sitemapprovider
Whenever you get an error that says "The Web server is configured to not list the contents of this directory", it usually means that there is a physical directory at the same location as the URL, which is taking precedence over it. In other words, there is already a folder...
asp.net-mvc-4,mvcsitemap,mvcsitemapprovider
HandleUnauthorizedRequest is only called by the MVC AuthorizeAttribute in the case where the authorization check fails. It is meant only for setting the handler of the request, not actually to provide the check whether the user is authorized. That said, MvcSiteMapProvider doesn't call HandleUnauthorizedRequest directly - it calls OnAuthorization. The...
asp.net-mvc,asp.net-mvc-5,mvcsitemap,mvcsitemapprovider
You must include at least 1 namespace in your routes when using areas with MvcSiteMapProvider for it to determine the area name. //ATS/Vacancy/Edit/33 context.MapRoute( "ATS_Vacancy", "ATS/Vacancy/{action}/{VacancyID}", new { Controller = "Vacancy", VacancyID = UrlParameter.Optional }, new string[] { "MyNamespace.Areas.ATS.Controllers" } ); See this answer for more information....
mvcsitemap,mvcsitemapprovider,asp.net-mvc-sitemap
ISiteMapNodeProvider instances cannot use the FindSiteMapNode function for 2 reasons. The first you have already discovered is that finding by URL can only be done if you set the url attribute explicitly in the node configuration. The second reason is that the SiteMapBuilder doesn't add any of the nodes to...
asp.net-mvc,autofac,mvcsitemapprovider,mvcsitemap,asp.net-mvc-sitemap
Just a hunch, but I suspect that you didn't update all of the visibilityProvider="MyNamespace.MyVisibilityProvider, MyAssembly" references in your configuration to the new assembly. The SiteMapNodeVisibilityProviderBase uses the .NET full type name to locate the correct type, including the assembly name. // From MvcSiteMapProvider.SiteMapNodeVisibilityProviderBase public virtual bool AppliesTo(string providerName) { if...
asp.net-mvc-4,structuremap,mvcsitemap,mvcsitemapprovider
If you installed MvcSiteMapProvider.MVC4.DI.StructureMap into your project, it does not require manual configuration. This package is for use when you don't already have DI in your project - it contains a composition root which is meant to be used as the single place to register all of your DI configuration...
asp.net-mvc,routing,sitemap,mvcsitemap
We had this same issue for MvcSiteMapProvider for MVC 4 and up. We solved it by removing and then replacing the UrlRoutingModule in the web.config file. <configuration> <system.webServer> <modules> <remove name="UrlRoutingModule-4.0" /> <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" /> </modules> </system.webServer> </configuration> ...
c#,sitemap,mvcsitemap,google-sitemap
If you're using C# you should use System.xml.linq (XDocument) You can remove a node like so: XDocument.Load(/*URI*/); var elements = document.Root.Elements().Where(e => e.Element("loc") != null && e.Element("loc").Value == "http://www.my.com/en/flight1"); foreach (var url in elements) { url.Remove(); } ...