|
@@ -42,9 +42,14 @@ namespace GxPress.Service.Implement
|
|
|
var requestBody = string.Empty;
|
|
|
if (requestMethod == "POST")
|
|
|
{
|
|
|
- context.Request.Body.Seek(0, SeekOrigin.Begin);
|
|
|
- var _reader = new StreamReader(context.Request.Body);
|
|
|
- requestBody = _reader.ReadToEnd();
|
|
|
+ //接收从微信后台POST过来的数据
|
|
|
+ using (var reader = new StreamReader(context.Request.Body))
|
|
|
+ {
|
|
|
+ requestBody = await reader.ReadToEndAsync();
|
|
|
+ }
|
|
|
+ // context.Request.Body.Seek(0, SeekOrigin.Begin);
|
|
|
+ // var _reader = new StreamReader(context.Request.Body);
|
|
|
+ // requestBody = _reader.ReadToEnd();
|
|
|
}
|
|
|
var model = new UserLogin
|
|
|
{
|