[Mono-bugs] [Bug 58758][Wis] Changed - ashx without codebehind cannot find dlls in bin/

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 25 May 2004 19:55:43 -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 chris@turchin.net.

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

--- shadow/58758	2004-05-25 18:39:50.000000000 -0400
+++ shadow/58758.tmp.3168	2004-05-25 19:55:43.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 58758
 Product: Mono: Class Libraries
 Version: unspecified
 OS: unknown
 OS Details: mdk 9.1
-Status: NEEDINFO   
+Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Wishlist
 Component: Sys.Web
 AssignedTo: gonzalo@ximian.com                            
 ReportedBy: chris@turchin.net               
@@ -141,6 +141,100 @@
 	}
 }
 
 ------- Additional Comments From gonzalo@ximian.com  2004-05-25 18:39 -------
 I need either the code to compile the assembly that provides Ntx.GD
 namespace or another test case. Do I put the assembly in bin?
+
+------- Additional Comments From chris@turchin.net  2004-05-25 19:55 -------
+If you take this code for the http handler:
+
+<%@ WebHandler Language="c#" Class="Test.T1" %>
+
+using System;
+using System.IO;
+using System.Web;
+using Test2;
+
+namespace Test
+{
+	public class T1:IHttpHandler
+	{
+		public void ProcessRequest (HttpContext c)
+		{
+			T2 t2 = new T2();
+			t2.Test();
+			c.Response.Write("mleh!");
+		}
+		public bool IsReusable
+		{
+		   get { return true; }
+		}
+	}					                       
+}
+
+and compile the following class this as a DLL (Test2.cs/Test2.dll):
+
+using System;
+namespace Test2
+{
+	public class T2
+	{
+		public void Test()
+		{
+			Console.WriteLine("test");
+			return;
+		}	
+	}	
+}
+
+and copy it to bin/ then the problem is reproducible (But the GD-Sharp
+code if you are interested is at gd-sharp.sf.net). I get the following
+error in the err_log when calling the handler in the browser:
+
+** (/usr/lib/mono/1.0/mcs.exe:19377): WARNING **: Could not find
+assembly GDGallery, references from
+/tmp/apache-temp-aspnet/39f05cbe/69476.dll (assemblyref_index=0)
+     Major/Minor: 1,0
+     Build:       1605,26398
+     Token:       (null)
+ 
+ 
+Unhandled Exception: System.NullReferenceException: A null value was
+found where an object instance was required.
+in (unmanaged) (wrapper managed-to-native)
+System.Reflection.Assembly:LoadFrom (string)
+in <0x00004> (wrapper managed-to-native)
+System.Reflection.Assembly:LoadFrom (string)
+in <0x000d1> Mono.CSharp.Driver:LoadAssembly (string,bool)
+in <0x000a5> Mono.CSharp.Driver:LoadReferences ()
+in <0x006b2> Mono.CSharp.Driver:MainDriver (string[])
+in <0x00012> Mono.CSharp.Driver:Main (string[])
+
+
+The wierd thing is, the GDGallery.dll is there in bin/. If I copy this
+GDGallery.dll to /usr/lib, then I get:
+
+** (/usr/lib/mono/1.0/mcs.exe:19399): WARNING **: Could not find
+assembly GD-Sharp, references from /usr/lib/GDGallery.dll
+(assemblyref_index=2)
+     Major/Minor: 0,0
+     Build:       0,0
+     Token:       (null)
+ 
+ 
+Unhandled Exception: System.NullReferenceException: A null value was
+found where an object instance was required.
+in (unmanaged) (wrapper managed-to-native)
+System.Reflection.Assembly:LoadFrom (string)
+in <0x00004> (wrapper managed-to-native)
+System.Reflection.Assembly:LoadFrom (string)
+in <0x000d1> Mono.CSharp.Driver:LoadAssembly (string,bool)
+in <0x000a5> Mono.CSharp.Driver:LoadReferences ()
+in <0x006b2> Mono.CSharp.Driver:MainDriver (string[])
+in <0x00012> Mono.CSharp.Driver:Main (string[])
+ 
+
+And when I copy GD-Sharp.dll to /usr/lib, then everything works
+fine... But that is not the point. AFAIK, it should work without
+copying these DLLs to another location. And like I said, as a compiled
+vesion with CodeBehind, it works...