ajaxasp.net-core.net-coreasp.net-ajaxhttp-status-code-500

Reading Ajax json using Area


I'm trying to pull data with the help of Ajax using Asp.net Core Area. Everything seems correct, but I'm getting a 500 error. Can you help me?

My WriterController class in "area":

enter image description here

WriterController Index:

enter image description here

Layout :

enter image description here

500 error:

enter image description here

Thanks.


Solution

  • I solved the problem. I needed to write the return type of the WriterList method in the WriterController class as JSON (not View).

    Thanks