0

The following code works just fine without FriendlyUR turned on for an ASP.Net Web Forms project:

$.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    data: "{}",      
    url: "bloglistService.aspx/showpost'",
    dataType: "json",
    async: true,
    success: function (data, status) {
        varList = (data.d);

Now, if the friendly urls are added using the NuGet package Microsoft.AspNet.FriendlyUrls, the same code would not work. As FriendlyUrls are turned on, I changed the URL in jquery ajax call to be "/bloglistService/showpost", until it is not working I am struggling to find out why this would not work, the only thing I changed was adding the nuget package for the FriendlyUrls!

Am I doing something wrong or missing something here? Has anyone encountered the same scenario for their project? If so, can you please answer how this can be solved? Thanks a bunch for taking time to read and reply.

anteAdamovic
  • 1,462
  • 12
  • 23

0 Answers0