uhaciogullari / SimpleMvcSitemap

A minimalist library for creating sitemap files inside ASP.NET MVC and ASP.NET Core MVC applications
MIT License
128 stars 39 forks source link

not working on large sitemap .net core 3.1 #39

Closed SPWwj closed 4 years ago

SPWwj commented 4 years ago

just test out SimpleMvcSitemap. it work fine on sitemap size around 50 urls+ however when i want to use it to generate 50k urls i found out that if sitemap has larger than 1000+ urls will get xml error "error on line 1 at column 65697: Opening and ending tag mismatch: lastmourl line 0 and url"

uhaciogullari commented 4 years ago

Hello

Could you provide a sample project to reproduce the bug?

SPWwj commented 4 years ago

Hi here is the sample project https://github.com/SPWwj/SitemapTest/tree/master/SitemapTest ,and here is the error result produced https://github.com/SPWwj/SitemapTest/blob/master/SitemapTest/wwwroot/productError.xml .net core version 3.1 Thank you.

uhaciogullari commented 4 years ago

Interesting. The response gets truncated after a certain size. It could be due to some changes in ASP.NET Core by version 3. I had a quick look but we couldn't find a setting to change that. I don't have time to investigate this thoroughly but you are free to do so and send me a PR with the fix.

anti-matter commented 4 years ago

To fix this, I had to stop using the new InProcess method for hosing on IIS.

In your project file, set the following:

`

OutOfProcess

`

It's a shame that we can't use InProcess, hopefully the author figure something out to get past whatever limitation it's running into.

martonx commented 4 years ago

Hi, This issue is serious! I have to do sitemap manually as a workaround. Please update and fix your lib.

uhaciogullari commented 4 years ago

Fixed! You can get the new version.