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

Senparc.NeuChar #6

Closed
qjkw5021 opened this issue Oct 17, 2018 · 2 comments
Closed

Senparc.NeuChar #6

qjkw5021 opened this issue Oct 17, 2018 · 2 comments

Comments

@qjkw5021
Copy link

System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'Senparc.NeuChar.MessageHandlers.MessageHandler3' threw an exception. Source=Senparc.NeuChar StackTrace: at Senparc.NeuChar.MessageHandlers.MessageHandler3..ctor(Stream inputStream, Int32 maxRecordCount, Object postData)
at Senparc.Weixin.MP.MessageHandlers.MessageHandler`1..ctor(Stream inputStream, PostModel postModel, Int32 maxRecordCount, DeveloperInfo developerInfo)
at MYOL.WeChatGZH.Service.CustomMessageHandler..ctor(String appId, String appSecret, Stream inputStream, PostModel postModel, Int32 maxRecordCount) in D:\zzh\MYOL.WeChatGZH\MYOL.WeChatGZH\Service\CustomMessageHandler.cs:line 52
at MYOL.WeChatGZH.Controllers.WeixinController.Post(PostModel postModel) in D:\zzh\MYOL.WeChatGZH\MYOL.WeChatGZH\Controllers\WeixinController.cs:line 104
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__12.MoveNext()

内部异常 1:
TypeInitializationException: The type initializer for 'Senparc.NeuChar.Register' threw an exception.

内部异常 2:
TypeInitializationException: The type initializer for 'Nested' threw an exception.

内部异常 3:
ArgumentNullException: Value cannot be null.

@JeffreySu
Copy link
Contributor

请升级到最新的版本试一下,比较有可能的是 PostModel 没有传入。或者没有按照Demo示例的方法进行注册。您可以更新到最新的版本试一下,如果还有问题可以提供一下Startup和WeixinController的代码帮你看一下。邮件:zsu@senparc.com

@qjkw5021
Copy link
Author

是少了 services.AddSenparcGlobalServices(Configuration)//Senparc.CO2NET 全局注册
.AddSenparcWeixinServices(Configuration);//Senparc.Weixin 注册
这两个,今天找到原因了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants