WCF service - HTTP500

Posted by ilkin on Stack Overflow See other posts from Stack Overflow or by ilkin
Published on 2010-04-12T09:22:57Z Indexed on 2010/04/12 10:53 UTC
Read the original article Hit count: 462

Filed under:
|
|
|

Hi guys,

I need help with wcf service. i have a ajax-enabled wcf service:

public class AddFavorites : Page
    {
        // Add [WebGet] attribute to use HTTP GET

        [WebGet(RequestFormat = WebMessageFormat.Json)]
        [OperationContract]
        public void AddFavorite()
        {
           this.AddMyFavorite(10, "sometext", "sometext");
        }
    }

And clientside looks like this:

function AddFavorite() {
    $.ajax({
        type: "GET",
        url: "/WebServices/AddFavorites.svc/AddFavorite",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        cache: false
    });
};

Im using fiddler to trace the application and i always get HTTP500. The class is inherited from Page class and uses the AddMyFavorite method that takes care of database. Website is hosted on iis7

© Stack Overflow or respective owner

Related posts about iis7

Related posts about jQuery