首页 > IT职业 > IT职场 > 用HTTP/Post与WCF互操作
WCF does not support raw HTTP requests with the content-type 'application/x-www-form-urlencoded' (which is the content-type the browser sends when you hit 'submit' in a
Here's how you read the input Stream:public void DoWork(Stream input) { StreamReader sr = new StreamReader(input); string s = sr.ReadToEnd(); sr.Dispose(); NameValueCollection qs = HttpUtility.ParseQueryString(s); string firstName = qs["firstName"]; string lastName = qs["lastName"]; // Do work here }来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2442/viewspace-2801053/ ,如需转载,请注明出处,否则将追究法律责任。