Can someone please assist me in resolving this issue? I've been struggling to find the solution and it seems like there's something obvious that I'm missing...
The problem I am facing involves sending a GET request from my JavaScript code, where the URL includes a Guid. However, the ASP.NET controller is not responding or registering the request to the API.
I have tried various approaches, but here is my current JavaScript code and Controller setup:
function fetchConversation(contactId) {
$.get("/contact/conversations", { contactId: contactId })
.done(function(response) {
let chatData = response.data || [];
displayChat(chatData);
});
}
and...
[Route("contact/conversations")]
public JsonResult ConversationWithContact(Guid? contactId)
{
... //this part is not being triggered
}
Every time I attempt to run the script, I encounter this error message:
https://i.sstatic.net/SPN1q.png
I am unsure about how to correctly bind the Guid so that it can be received by the ASP.NET Controller. Any suggestions would be highly appreciated! Thank you and have a wonderful day!