0

I am in the process of writing my website in C # APS Core 3. I have added a sitemap to it and I have a problem with the number of entries. If the sitemap contains 81 addresses or less then everything is fine, but if another entry is added, there is an error

XML processing error: root element not found Area: mywebpage.com/sitemap.xml Line number: 1, column 1:

The google website says that the page cannot exceed 50 MB and 50 thousand links. My page is 63.74 KB, this is how many are uploaded in the request.

How can I increase the number of links sent in the sitemap?

Edited.

I don't want to create a sitemap tree with 80 links

Solution

I ran the website in debug mode and got the error message "Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead. " I found a solution to this problem at ASP.NET Core : Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead

After the code is sent to the server, your sitemap works fine.

  • Check this answer: [If you're running your ASP.Net Core application in IIS, then the IIS pipeline is intercepting your request before it hits your application](https://stackoverflow.com/questions/38698350/increase-upload-file-size-in-asp-net-core) – dobre.b Jan 31 '22 at 13:43
  • Increasing the file upload size limit did not help to solve the problem. – Matt Mcgork Jan 31 '22 at 13:56
  • There's something wrong with the file, or with the code that's generating it. It's hard to tell you what, since we can't see either. All we can tell you is that you're adding an element outside of the current root element, which produces an invalid XML file. – Richard Deeming Jan 31 '22 at 15:11

0 Answers0