User1524504779 posted
I am working on a code (already in production). Trying to set the same up in my local, but I am running into problem .
I have a WCF service
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/App/user/List", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
GridResult<userItem> Getusers(Stream form);
But the implementation is like
public GridResult<userItem> Getusers(Stream form){
int userID = int.Parse(HttpContext.Current.Request.Form["userID"].ToString());
/** More Code goes here **/
}
Now my problem is my request fails here when accessing the HttpContext.Current.Request.Form since it is empty. But the Stream contains the post data.
But the same code hosted in production works. Is there any third party library am i missing which just maps the stream data into the HttpContext.Current.Request.Form name value pairs ?
Please help me out of this.