DotNetOpenAuth 有时会抛出 NotImplementedException

发布于 2024-10-09 01:00:43 字数 1443 浏览 4 评论 0原文

我在后台线程上运行 DotNetOpenAuth,定期调用 OAuth 授权的 Google。

大约每天一次(大约是万分之一的调用),我会收到以下异常:

发生未处理的异常,进程被终止。应用程序 ID:DefaultDomain 进程 ID:3316 异常:System.NotImplementedException 消息:该方法或操作未实现。 StackTrace:位于 c:\Users\andarno\git\dotnetopenid\src\DotNetOpenAuth\Messaging\ProtocolException.cs 中的 DotNetOpenAuth.Messaging.ProtocolException.GetObjectData(SerializationInfo info, StreamingContext context):System.Runtime.Serialization.Formatters 的第 90 行。 Binary.WriteObjectInfo.InitSerialize(对象 obj,ISurrogateSelector surrogateSelector,StreamingContext 上下文,SerObjectInfoInit serObjectInfoInit,IFormatterConverter 转换器,ObjectWriter objectWriter,SerializationBinder 绑定器)在 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(对象 obj,ISurrogateSelector surrogateSelector,StreamingContext 上下文、 SerObjectInfoInit serObjectInfoInit、IFormatterConverter 转换器、ObjectWriter objectWriter、SerializationBinder 绑定器)位于 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(对象图、 Header[] inHeaders、__BinaryWriter serWriter、Boolean fCheck)位于 System.Runtime.Serialization.Formatters .Binary.BinaryFormatter.Serialize(流序列化流,对象图,Header[]标头,布尔fCheck)在System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(对象obj,MemoryStream stm)在System.AppDomain.Serialize(对象o)在 System.AppDomain.MarshalObject(Object o)

如果它每天被抛出并捕获一次,我会没事的,但这是一个大问题 - 我在服务器上的应用程序错误日志中得到了这个,它使整个过程 - 站点关闭并重新启动。

还有其他人遇到过这个吗?我明显做错了什么?

I have DotNetOpenAuth running on a background thread making calls to Google authorized with OAuth on a regular basis.

About once a day, which is about one in 10,000 calls, I get the following Exception:

An unhandled exception occurred and the process was terminated. Application ID: DefaultDomain Process ID: 3316 Exception: System.NotImplementedException Message: The method or operation is not implemented. StackTrace: at DotNetOpenAuth.Messaging.ProtocolException.GetObjectData(SerializationInfo info, StreamingContext context) in c:\Users\andarno\git\dotnetopenid\src\DotNetOpenAuth\Messaging\ProtocolException.cs:line 90 at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm) at System.AppDomain.Serialize(Object o) at System.AppDomain.MarshalObject(Object o)

If it was thrown and caught once a day I'd be fine, but this is a big one - I'm getting this in the Application Error log on the server, and it's crashing the process entirely - the site goes down and restarts.

Has anyone else run into this? Something I'm clearly doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乜一 2024-10-16 01:00:43

看起来服务器正在尝试序列化 DotNetOpenAuth.Messaging.ProtocolException ,但它(当前)不支持序列化。然而,这表明在此之前存在一个未报告的问题,因为在报告该问题时我们遇到了另一个问题。如果您有导致此错误的日志,它可能会帮助您发现这个主要问题是什么。

您应该在 http://dotnetopenauth.uservoice.com/。我们会认真考虑这些请求,因此如果您希望解决此问题,请考虑提交该请求。

至于为什么它会导致整个过程失败——我的猜测如上所述,这是报告问题时出现的问题,也许主机(大概是 ASP.NET)没有准备好处理这个问题。

It looks like the server is trying to serialize a DotNetOpenAuth.Messaging.ProtocolException, which doesn't (currently) support serialization. However, this suggests that there is a problem prior to this that is not reported because in the reporting of the problem we hit another one. If you have logs leading up to this error it might help you uncover what this leading problem is.

Supporting serialization of the ProtocolException to avoid this second problem is something you should request on http://dotnetopenauth.uservoice.com/. Those requests are considered seriously so please consider filing it if you want this fixed.

As far as why it's bringing down the whole process -- my guess is as above, that it's a problem while reporting a problem, and perhaps the host (ASP.NET presumably) isn't prepared to deal with that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文