ib3an
ib3an

Reputation: 241

WCF Parameter Value is null

I'm trying to test WCF REST service with multiple parameter. I only get one value from my passed parameter, the reset is null. What wrong on my code or fiddler. I hope someone can point me right direction.

[OperationContract]
[WebInvoke(
    BodyStyle = WebMessageBodyStyle.Wrapped,
    Method = "POST",
    RequestFormat = WebMessageFormat.Json,
    ResponseFormat = WebMessageFormat.Json,
    UriTemplate = "Valid/{Id}")]
string ValidateUser(LogInDetail loginDetail,string Id);

public string ValidateUser(LogInDetail loginDetail,string Id)
{
    //your validation logic 
    return loginDetail.userName; //always null value
}

enter image description here

Upvotes: 1

Views: 1857

Answers (1)

ib3an
ib3an

Reputation: 241

I got answered at WCF Forum. Here is answer Link

Upvotes: 1

Related Questions