XML Parsing Error: no root element found Location in Console FF
Check this link for more information
Based on my research, the error message is only generated by FireFox when the render page is blank in Internet. For some reason, .NET generates a response type of "application/xml" when it creates an empty page. Firefox parses the file as XML and finding no root element, spits out the error message.
in other words, this is a known Firefox issue
I changed the type of return value in Action method and it worked. More details can be found in my article on this topic.
Changed from
return Ok();
to
return Json("Ok");
public IActionResult MethodName(){ // YOUR CODE return StatusCode(204);}
Code 204 -The server successfully processed the request, and is not returning any content
For more details about status code check this page:List of HTTP status codes