danielcrenna/sitemaps — Issue #3: Sitemaps problems with T4MVC, Constraints, AttributeRouting, ...
Author: shapper
Created: 2011-11-28 00:14:25+00:00
State: open

Hello,

I have been trying Sitemaps which I really wanted to include on my CMS but I found to many issues with it:

I installed the package and added Sitemap to Index action in HomeController.

1 - Because I am using T4MC I get on my sitemapper the following:

http://localhost:1082/Flug/Home
2011-11-27T23:59:24
daily
0,5

http://localhost:1082/Flug/T4MVC_Home
2011-11-27T23:59:24
daily
0,5

So it seems sitemaps adds duplicated routes when using T4MVC.

2 - Then I tried something else: adding an area.
To be able to have controllers inside the area with the same names of the root controllers I added the following:

routes.MapRoute("Default",
"{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new String[] { "MvcApp.Controllers" });

Now Sitemaps adds the routes of the area and not of the root Home/Index

http://localhost:1082/MyArea/Home
2011-11-27T23:59:24
daily
0,5

http://localhost:1082/MyArea/T4MVC_Home
2011-11-27T23:59:24
daily
0,5

And again duplicated ...

3 - Finally I started using https://github.com/mccalltd/AttributeRouting.

Now Sitemaps does something really strange. I get an exception:

Call stack location

Sitemaps.DLL!Sitemaps.SitemapController.Index(int? page, int? count) Line 23 + 0x3e bytes

Locating source for 'D:\My Dropbox\_7_Source_Code\_1_Projects\Sitemaps\src\Sitemaps\SitemapController.cs'. Checksum: MD5 {c9 a5 75 29 8c 2e d6 c2 19 9d 36 2 a6 aa f0 5c}
The file 'D:\My Dropbox\_7_Source_Code\_1_Projects\Sitemaps\src\Sitemaps\SitemapController.cs' does not exist.
Looking in script documents for 'D:\My Dropbox\_7_Source_Code\_1_Projects\Sitemaps\src\Sitemaps\SitemapController.cs'...
Looking in the projects for 'D:\My Dropbox\_7_Source_Code\_1_Projects\Sitemaps\src\Sitemaps\SitemapController.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: D:\My Dropbox\_7_Source_Code\_1_Projects\Sitemaps\src\Sitemaps\SitemapController.cs.
The debugger could not locate the source file 'D:\My Dropbox\_7_Source_Code\_1_Projects\Sitemaps\src\Sitemaps\SitemapController.cs'.

Can there problems be solved?

Thank You,
Miguel