[Mono-bugs] [Bug 332434] New: [PATCH] HttpApplication on windows always expects "bin" directory and causes crash when nonexistent

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 10 02:40:54 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=332434#c332150

           Summary: [PATCH] HttpApplication on windows always expects "bin"
                    directory and causes crash when nonexistent
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


While trying to run test case #332150 on Windows, I came across this HTTP 500
error on the web browser via xsp2:

System.IO.DirectoryNotFoundException: Directory
'C:\cygwin\home\atsushi\tests\wsdl\TestCase-332150\bin' not found.
  at System.IO.Directory.GetFileSystemEntries (System.String path,
System.String pattern, FileAttributes mask, FileAttributes attrs) [0x00000] 
  at System.IO.Directory.GetFiles (System.String path, System.String pattern)
[0x00000] 
  at System.Web.HttpApplication.get_BinDirectoryAssemblies () [0x00000] 
  at System.Web.Compilation.AppCodeCompiler.Compile () [0x00000] 
  at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext
context) [0x00000] 

This could be simply fixed by such a tiny change:

Index: System.Web/HttpApplication.cs
===================================================================
--- System.Web/HttpApplication.cs       (revision 87237)
+++ System.Web/HttpApplication.cs       (working copy)
@@ -1324,9 +1324,11 @@
                                string baseDir = setup.ApplicationBase;
                                string bindir;

-                               if (Environment.GetEnvironmentVariable
("MONO_IOMAP") != null || IsRunningOnWindows)
-                                       yield return Path.Combine (baseDir,
"bin");
-                               else {
+                               if (Environment.GetEnvironmentVariable
("MONO_IOMAP") != null || IsRunningOnWindows) {
+                                       bindir = Path.Combine (baseDir, "bin");
+                                       if (Directory.Exists (bindir))
+                                               yield return bindir;
+                               } else {
                                        foreach (string dir in BinDirs) {
                                                bindir = Path.Combine (baseDir,
dir);
                                                if (!Directory.Exists (bindir))


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list