views:

30

answers:

1

I have created a SampleItem just to test:

public class SampleItem
{
    public string Name { get; set; }
}

and the method that I calling from th service looks like this:

    public void send(SampleItem s)
    {
        String siteName = s.Name;
    }

And Iam debbuging this mehtod, What I can notice is that the "s (sampleitem is null)"

This is the data Iam sending trougt fiddler: { "SampleItem" : { "Name": "MyComp"} }

I Don't know what Iam doing wrong,

Request headers:

User-Agent: Fiddler

Content-type: application/json Host: localhost:30677 Content-Length: 54

A: 

I found the issue,,

In json-string, I should name it to "s" instead for SampleItem

Troj