[Mono-bugs] [Bug 68207][Nor] New - AmbiguousMatchException using binary serialization in XSP

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 13 Oct 2004 10:44:03 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen@pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=68207

--- shadow/68207	2004-10-13 10:44:03.000000000 -0400
+++ shadow/68207.tmp.5650	2004-10-13 10:44:03.000000000 -0400
@@ -0,0 +1,91 @@
+Bug#: 68207
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: AmbiguousMatchException using binary serialization in XSP
+
+When using binary serialization in XSP using the following code fragment :
+
+---
+
+BinaryFormatter bf = new BinaryFormatter ();
+MemoryStream ms = new MemoryStream ();
+		
+NameValueCollection nv = new NameValueCollection ();
+bf.Serialize (ms, nv);
+
+ms.Position = 0;
+byte[] b = new byte[ms.Length];
+ms.Read (b, 0, b.Length);
+ms.Close ();
+
+---
+
+I get the following exception :
+
+System.Reflection.AmbiguousMatchException: Ambiguous matching in method 
+resolution
+in <0x0018e> Default:SelectMethod 
+(System.Reflection.BindingFlags,System.Reflection.MethodBase[],System.Type
+[],System.Reflection.ParameterModifier[])
+in <0x00221> System.MonoType:GetMethodImpl 
+(string,System.Reflection.BindingFlags,System.Reflection.Binder,System.Ref
+lection.CallingConventions,System.Type
+[],System.Reflection.ParameterModifier[])
+in <0x000ce> System.Type:GetMethod 
+(string,System.Reflection.BindingFlags,System.Reflection.Binder,System.Ref
+lection.CallingConventions,System.Type
+[],System.Reflection.ParameterModifier[])
+in <0x0001c> System.Type:GetMethod (string,System.Type[])
+in <0x00091> 
+System.Runtime.Serialization.Formatters.Binary.CodeGenerator:EmitWrite 
+(System.Reflection.Emit.ILGenerator,System.Type)
+in <0x00041> 
+System.Runtime.Serialization.Formatters.Binary.CodeGenerator:EmitWritePrim
+itiveValue (System.Reflection.Emit.ILGenerator,System.Type)
+in <0x00f7f> 
+System.Runtime.Serialization.Formatters.Binary.CodeGenerator:GenerateMetad
+ataType (System.Type,System.Runtime.Serialization.StreamingContext)
+in <0x00035> 
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:CreateMemberTy
+peMetadata (System.Type)
+in <0x004fc> 
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:GetObjectData 
+(object,System.Runtime.Serialization.Formatters.Binary.TypeMetadata&,objec
+t&)
+in <0x00044> 
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObject 
+(System.IO.BinaryWriter,long,object)
+in <0x0013d> 
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObjectIns
+tance (System.IO.BinaryWriter,object,bool)
+in <0x00035> 
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteQueuedObj
+ects (System.IO.BinaryWriter)
+in <0x00045> 
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObjectGra
+ph (System.IO.BinaryWriter,object,System.Runtime.Remoting.Messaging.Header
+[])
+in <0x00263> 
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Serialize 
+(System.IO.Stream,object,System.Runtime.Remoting.Messaging.Header[])
+in <0x00015> 
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Serialize 
+(System.IO.Stream,object)
+
+Note : I only get this exception when I run that code fragment in XSP, 
+not if I use a console app.
+
+I attached a small web app to allow you to reproduce this issue.