문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top