[Mono-bugs] [Bug 80051][Cri] New - App_Code compilation does not work in mono 1.2.1

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Nov 26 06:01:57 EST 2006


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 dna at informatik.uni-kiel.de.

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

--- shadow/80051	2006-11-26 06:01:57.000000000 -0500
+++ shadow/80051.tmp.3976	2006-11-26 06:01:57.000000000 -0500
@@ -0,0 +1,104 @@
+Bug#: 80051
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: Ubuntu 6.10
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: dna at informatik.uni-kiel.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: App_Code compilation does not work in mono 1.2.1
+
+Description of Problem:
+
+I'm using the Mono 1.2.1 installer on Ubuntu 6.10.
+
+Testing the "Hello World" Webservice on XSP2 throws following exception:
+
+Server error in '/' application
+Description: Error processing request.
+
+Error Message: HTTP 500.
+
+Stack Trace:
+
+System.BadImageFormatException: Could not load file or assembly
+'/tmp/dna-temp-aspnet-0/9faa2b22/App_Code.77c48e50.dll' or one of its
+dependencies. An attempt was made to load a program with an incorrect format.
+File name: '/tmp/dna-temp-aspnet-0/9faa2b22/App_Code.77c48e50.dll'
+  at <0x00000> <unknown method>
+  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom
+(string,bool)
+  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile)
+[0x00000] 
+  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.String
+virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] 
+  at System.Web.Compilation.AssemblyBuilder.BuildAssembly
+(System.CodeDom.Compiler.CompilerParameters options) [0x00000] 
+  at System.Web.Compilation.AppCodeAssembly.Build () [0x00000] 
+  at System.Web.Compilation.AppCodeCompiler.Compile () [0x00000] 
+  at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext
+context) [0x00000] 
+  at System.Web.HttpApplicationFactory.GetApplication
+(System.Web.HttpContext context) [0x00000] 
+  at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x00000] 
+
+
+Steps to reproduce the problem:
+1. Create "Hello World Webservice"
+
+~/Service.asmx:
+<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs"
+Class="Service" %>
+
+~/App_Code/Service.cs:
+using System;
+using System.Web;
+using System.Web.Services;
+using System.Web.Services.Protocols;
+
+[WebService(Namespace = "http://tempuri.org/")]
+[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
+public class Service : System.Web.Services.WebService
+{
+    public Service () {
+
+        //Uncomment the following line if using designed components 
+        //InitializeComponent(); 
+    }
+
+    [WebMethod]
+    public string HelloWorld() {
+        return "Hello World";
+    }
+    
+}
+
+2. Start XSP2:
+xsp2 --port 8080 --root ~/WebSite1/
+
+3. Open URL in Webbrowser:
+http://localhost:8080/Service.asmx
+
+Actual Results:
+Exception
+
+Expected Results:
+A Hello World Webservice
+
+How often does this happen? 
+every time.
+
+Additional Information:
+Precompiling ~/App_Code/Service.cs and put it in ~/bin (Why does ~/Bin not
+work?) and edit the service.asmx to:
+<%@ WebService Language="C#" CodeBehind="Service.dll" Class="Service" %>
+
+works well.


More information about the mono-bugs mailing list