I have tried to create a RESTful WCF service to retrieve titles of news items suing the tutorial at the mentioned link below but my console says "HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR): POST - localhost:11321/.../GetNewsTitles" .
What is that I'm missing?
Would appreciate your inputs.
Screenshot attached for the project folder structure in VS.
No need to create any rest service to news items. Sitefinity provides inbuilt. Below lines of code should give you everything related to News items.
contentType: "application/json; charset=utf-8",
data: JSON.stringify( skip: 0, take: 10 ),
success: function (result) console.log(result);
for(var i=0; i<=result.TotalCount;i++)
$("#Mydata").append(result.Items[i].Title); /* #Mydata is the id of a div placed in my page in content block widget to append my results to show on my page */
error: function (error) alert(error);
Also Sitefinity provides rest services for all the inbuilt content. You can find them in your project folder with path as YourProject/Sitefinity/Services in visual studio.