Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

消息模拟工具SimulateTool创建的请求无法正常的被NetCore版本项目读取? #1090

Closed
4 of 26 tasks
yyjdelete opened this issue Feb 27, 2018 · 2 comments
Closed
4 of 26 tasks

Comments

@yyjdelete
Copy link

(*** 此版块专为反馈bug及提交需求服务,不负责解答开发问题,请勿发表开发问题,
如果您需要这方面的帮助,请移步问答社区https://weixin.senparc.com/QA ***)

问题描述

消息模拟工具http://sdk.weixin.senparc.com/SimulateTool 创建的请求无法正常的被NetCore版本项目读取?(Request.Body为空)

是不是这里处理的有问题(试过手动改了ContentType为text/xml之后是能用的). 暂时没有去确认微信发的ContentType是啥.
https://github.com/JeffreySu/WeiXinMPSDK/blob/v14.10.0/src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/RequestUtility.Post.cs#L273
https://github.com/JeffreySu/WeiXinMPSDK/blob/v14.10.0/src/Senparc.Weixin/Senparc.Weixin/Utilities/HttpUtility/RequestUtility.Post.cs#L166

微信官方文档 URL
微信官方文档快照(直接复制关键内容到下方)
发现问题的模块
  • Senparc.Weixin 版本:
  • Senparc.Weixin.MP 版本:4.20.0
  • Senparc.Weixin.MP.MVC 版本:
  • Senparc.Weixin.Open 版本:
  • Senparc.Weixin.QY 版本:
  • Senparc.Weixin.Work 版本:
  • Senparc.Weixin.WxOpen 版本:
  • Senparc.Weixin.Cache.Redis 版本:
  • Senparc.Weixin.Cache.Memcached 版本:
  • 其他模块:
模块对应的.net版本
  • .net 3.5(已经停止更新)
  • .net 4.0(已于2017年7月暂时停止更新)
  • .net 4.5
  • .net 4.6.1
  • .net core
开发环境
  • Visual Studio 2010
  • Visual Studio 2010 (SP1)
  • Visual Studio 2012
  • Visual Studio 2013
  • Visual Studio 2015
  • Visual Studio 2017
  • 其他:
缓存环境
  • 服务器内存缓存(默认)
  • Redis 版本:
  • Memcached 版本:
  • 其他
联系方式

Email:

(也可将问题地址及联系方式发送到 www.jeffrey.su@gmail.com)

@yyjdelete yyjdelete changed the title SimulateTool 消息模拟工具SimulateTool无法正常的被NetCore版本项目读取? Feb 27, 2018
@yyjdelete yyjdelete changed the title 消息模拟工具SimulateTool无法正常的被NetCore版本项目读取? 消息模拟工具SimulateTool创建的请求无法正常的被NetCore版本项目读取? Feb 27, 2018
@JeffreySu
Copy link
Owner

@yyjdelete 这个类型本身不重要,应该是.net core在解析数据的过程中,需要使用到这个ContentType,推测和微信无关。我们会进一步进行确认。
另外给Post犯法加上ContentType可选的参数确实也是一个可以优化的地方,谢谢提醒!

@JeffreySu JeffreySu added the task label Feb 27, 2018
@JeffreySu JeffreySu added this to TODO in Senparc.Weixin via automation Feb 27, 2018
lishewen added a commit to lishewen/WeiXinMPSDK that referenced this issue Apr 1, 2018
…equestRewind模式令Request.Body可以二次读取,以解决某些特殊情况下netcore默认机制导致的Request.Body为空而引发的WeixinSDK错误的问题。JeffreySu#1090
@JeffreySu
Copy link
Owner

@lishewen 这里说的问题已经在你提供的最新更新中解决了,是吧?

Senparc.Weixin automation moved this from TODO to Done Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants