Orchard begins to work under Mono

by grendel 3. February 2011 10:32
After 4 days of work, the first Orchard screen rendered:

This is just a start as it's only the setup screen, but it's a major step forward and a sign that Mono supports MVC3/Razor well enough to run a pretty complex application Orchard is. Make no mistake - the simplicity of the screen is misleading. Behind the scenes we have a whole lot of dynamic objects created using DLR, lots of components built, assemblies loaded, files parsed and code generated. Note also that NO changes were needed to Orchard code in order to make this happen.

I have modifed the setup screen code a bit to show that it indeed runs on Mono :)

The next step is set up SQL and see what breaks next :). It's a good start though!

To test this yourself you will need:

  • Mono from the master branch (all the necessary fixes are ported to the mono-2-10 as well but I haven't really tested it with 2.10 so I can't certify it works there)
  • MonoDevelop from its master branch (xbuild will currently not work).
After the build is done make sure to remove the Orchard.Web/bin/Microsoft.Web.Infrastructure.dll assembly as Mono provides its own version. And remember that Orchard is a .NET 4.0 application - you need to use the following command to run it:
MONO_IOMAP=all xsp4

Tags:

Mono | MVC | MVC3 | Orchard | Razor

Mono and ASP.NET MVC v3

by grendel 17. January 2011 09:23
Microsoft has recently released the next version of the ASP.NET MVC stack and many of you have been asking whether Mono supports it. The answer is complicated since this MVC release is much bigger and includes more components than the previous ones. Unfortunately not all of those components have been released as open source software (although they come with the right to redistribute the assemblies) and therefore MVC integration with the Mono sources and build system makes no point at the moment. The highlight of the release is the new Razor template engine which is among the source-less components, so the Mono build of MVC would have to be done without support for Razor, which would probably take away all the fun from using it for many people. Having said that, I have managed to get to compile with current Mono from master after stubbing out several assemblies (read below for the list) and disabling Razor. The code lives in my local git branch and is not going to hit the Mono repository just yet. The reason for this is that we have decided to first make sure that MVC binaries from Microsoft work fine with Mono and only then set out to implement the non-open source assemblies it relies upon. I committed several changes (commits: c372ab7, 0582257, 1d5e3d4, d18d086, aa2ad86, cd511ea and 3e62637) which made it possible to run an MVC v3 application generated from the default VisualStudio template using several assemblies distributed by Microsoft. To get the application working you need to put in your bin/ folder the following dlls:
  • System.Web.Mvc.dll
  • System.Web.Razor.dll
  • System.Web.WebPages.Deployment.dll
  • System.Web.WebPages.dll
  • System.Web.WebPages.Razor.dll
All of the above assemblies, with the exception of the Mvc one, come without sources and will be at some point implemented in Mono. Also note that the Microsoft.Web.Infrastructure assembly added with the above commits is mostly a collection of stubs so you might (and will) come across the NotImplementedException from time to time. So, with the above changes you should be able to give MVC v3 on Mono a spin - if you come across any issues with running your app on Mono, do file a bug report attaching your application (or, if it is too big/private/secret/etc, a small test case which triggers the issue) to help us iron out all the rough edges.

Update: Gonzalo got Razor working under Mono - please report all the issues you have with your Razor applications under Mono! Congrats, Gonzalo :)

Tags: ,

Mono | ASP.NET | MVC | MVC3

How sgen rocks

by grendel 24. August 2010 18:29

As most of you probably know, Mark Probst (schani) has been hard at work in the past year on implementing a new, generational, garbage collector for Mono (called sgen). The hopes were high for this work as the currently default garbage collector in Mono, boehm, is not really up to the task and causes major slowdowns under certain workloads. The hopes were high, but Mark managed to meet and exceed them :) The test page can be found here. Below are results of a simple test, to run several thousands of requests against a small ASP.NET page, served by XSP. The first run is a "warm-up" one - that is, at the very first request gmcs is invoked in order to compile the .aspx into an assembly. The second request is "pure", without the compilation toll. The test consisted of running the following command line on the client machine (2.2GHz dual core):

ab2 -n 50000 -c 20 -k http://192.168.1.2/hi.aspx
The server was a quad 2.4GHz Xeon machine with hyper-threading on (giving 4 real and 4 "virtual" cores). The tests were conducted with Mono from the master branch. Both machines were running 64-bit Linux (OpenSuSE 11.3). The first set of results is for the boehm gc:
# ab2 -n 50000 -c 20 -k http://192.168.1.2:8080/hi.aspx
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.2 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        Mono.WebServer.XSP/2.7.0.0
Server Hostname:        192.168.1.2
Server Port:            8080

Document Path:          /hi.aspx
Document Length:        699 bytes

Concurrency Level:      20
Time taken for tests:   34.739 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    49520
Total transferred:      51478420 bytes
HTML transferred:       34950000 bytes
Requests per second:    1439.30 [#/sec] (mean)
Time per request:       13.896 [ms] (mean)
Time per request:       0.695 [ms] (mean, across all concurrent requests)
Transfer rate:          1447.13 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0      17
Processing:     4   14  26.1     10    1220
Waiting:        4   14  26.1     10    1220
Total:          4   14  26.2     10    1224

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     11
  75%     12
  80%     13
  90%     22
  95%     38
  98%     52
  99%     57
 100%   1224 (longest request)
# ab2 -n 50000 -c 20 -k http://192.168.1.2:8080/hi.aspx
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.2 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        Mono.WebServer.XSP/2.7.0.0
Server Hostname:        192.168.1.2
Server Port:            8080

Document Path:          /hi.aspx
Document Length:        699 bytes

Concurrency Level:      20
Time taken for tests:   55.495 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    49518
Total transferred:      51478320 bytes
HTML transferred:       34950000 bytes
Requests per second:    900.98 [#/sec] (mean)
Time per request:       22.198 [ms] (mean)
Time per request:       1.110 [ms] (mean, across all concurrent requests)
Transfer rate:          905.88 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0  13.7      0    3053
Processing:     2   22  38.9     11    1535
Waiting:        2   22  38.7     11    1535
Total:          2   22  41.3     11    3071

Percentage of the requests served within a certain time (ms)
  50%     11
  66%     12
  75%     12
  80%     13
  90%     65
  95%     92
  98%    115
  99%    241
 100%   3071 (longest request)
The second set is for the sgen gc:
# ab2 -n 50000 -c 20 -k http://192.168.1.2:8080/hi.aspx
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.2 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        Mono.WebServer.XSP/2.7.0.0
Server Hostname:        192.168.1.2
Server Port:            8080

Document Path:          /hi.aspx
Document Length:        699 bytes

Concurrency Level:      20
Time taken for tests:   28.736 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    49520
Total transferred:      51478420 bytes
HTML transferred:       34950000 bytes
Requests per second:    1739.99 [#/sec] (mean)
Time per request:       11.494 [ms] (mean)
Time per request:       0.575 [ms] (mean, across all concurrent requests)
Transfer rate:          1749.45 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.0      0      29
Processing:     4   11  27.6     10    1383
Waiting:        4   11  27.6     10    1383
Total:          4   11  27.8     10    1387

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     11
  75%     12
  80%     12
  90%     14
  95%     15
  98%     18
  99%     23
 100%   1387 (longest request)
# ab2 -n 50000 -c 20 -k http://192.168.1.2:8080/hi.aspx
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.2 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        Mono.WebServer.XSP/2.7.0.0
Server Hostname:        192.168.1.2
Server Port:            8080

Document Path:          /hi.aspx
Document Length:        699 bytes

Concurrency Level:      20
Time taken for tests:   33.681 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Keep-Alive requests:    49512
Total transferred:      51478045 bytes
HTML transferred:       34950000 bytes
Requests per second:    1484.52 [#/sec] (mean)
Time per request:       13.472 [ms] (mean)
Time per request:       0.674 [ms] (mean, across all concurrent requests)
Transfer rate:          1492.58 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0  23.6      0    3089
Processing:     2   13  24.2     10     674
Waiting:        2   13  24.2     10     674
Total:          2   13  33.8     10    3099

Percentage of the requests served within a certain time (ms)
  50%     10
  66%     11
  75%     12
  80%     13
  90%     14
  95%     16
  98%     21
  99%    172
 100%   3099 (longest request)
The points of interest are:
  • Requests per second. Both tests show that the second run is slower, which is to be expected since there are more objects to be collected. Boehm has much more work here since it has to perform a lot of big collections, while sgen wins by having two kinds of collections - major and minor. Sgen wins hands down here.
  • Percentage of requests run in given time. Boehm shows a pretty big difference in times here, while sgen is more uniform and, once again, faster.
  • Throughput. And for the third time, boehm loses here considerably - sgen by taking advantage of its minor collection feature spends less time freeing memory and therefore gives better transfer.
  • Memory usage. This is not shown above, but sgen left xsp with more memory at the end of the test run than boehm (~900mb vs ~800mb), but this is expected to change as sgen development progresses.
One thing to note is that you need to run mono with the -O=-aot option when testing sgen (at least on x86-64) since AOT somehow causes it to crash XSP. So, two conclusions here. Sgen is going to make Mono much, much faster and, as Gonzalo> put it (hitting the bull's eye): <gonzalo> YOU ROCK :D (in response to Schani's question if Gonzalo was kidding regarding the performance improvement)

Tags:

Mono

ASP.NET 4.0 features: pre-application start methods

by grendel 17. May 2010 13:31

This article applies to Mono version 2.7 (at least SVN revision 157449) or newer

With this post I am starting a series of post on new features found in ASP.NET 4.0 and Mono 2.8. There's no real schedule to the series, I will post new articles as code gets committed to Mono and whenever I have time to develop a sample or two to demonstrate the feature.

ASP.NET 4.0 introduces a feature described by Phil Haack in his recent post. Ability to execute methods before application starts is useful to register BuildProviders without the need to modify web.config - this is its primary purpose, as Phil states in his post, but not the only possible use. Application can take advantage of this feature to provide code to perform early site setup (steps which do not require user feedback or interactivity - creating cache directories, populating freshly installed application with sample content, performing access checks etc) or to load dynamically configurable plugins. After a quick recap of how the feature works, I will describe a simple example of such an application which performs both of the above steps.

To execute code before ASP.NET compiles your site and creates an instance of HttpApplication (or a derived class, if your application has it) you need to take advantage of a new custom attribute introduced in ASP.NET 4.0, PreApplicationStartMethodAttribute. This attribute can be used once per each assembly in your application's bin/ folder. Attribute takes two parameters - type which contains your pre-application start method and a method name. Method must be public static and can take no parameters. Code from sample accompanying this article which demonstrates the usage:

using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Web;

using PreApplicationStartSupport.Core;

// There can be only one such attribute instance per assembly.
[assembly:PreApplicationStartMethod (typeof (PreApplicationStart.Application.Init), "InitializeApplication")]

namespace PreApplicationStart.Application
{
	public class Init
	{
		public static void InitializeApplication ()
		{
			// perform initialization
		}
	}
}

There are several new 4.0 methods around the ASP.NET class hierarchy which can be called only before or during the pre-application start phase (two of those methods - BuildProvider.RegisterBuildProvider and BuildManager.AddReferencedAssembly are mentioned in Phil's article and pretty well documented on MSDN.

In the sample application, the method shown in the code excerpt above performs all the actions mentioned previously - initial site setup and plugin loading:

public static void InitializeApplication ()
{
	string appDir = HttpRuntime.AppDomainAppPath;
	string stampFile = Path.Combine (appDir, "App_Data", ".setup_done");
	MessageContainer messages = MessageContainer.Instance;

	messages.Clear ();
	if (!File.Exists (stampFile)) {
		messages.Add ("First run - need to perform setup steps.");
		RunSetup (messages, appDir);
	}

	Assembly pluginAssembly = PluginLoader.LoadPlugin ("SamplePlugin");
	if (pluginAssembly == null)
		messages.Add ("Init: failed to load plugin 'SamplePlugin'");
	else
		LoadPluginResources (pluginAssembly, messages);
	}
As you can see, there's nothing at all special to this code - just a regular method. For the links to full source code, see the bottom of this article.

To run the sample application under Mono, you need to have Mono version mentioned at the top of the post and execute this command, in the application's root directory:

MONO_OPTIONS="--debug" xsp4
After browsing to http://localhost:8080/ you will be greeted with the following output (yes, spartan, ugly etc - I know :D):
Event log:

[5/17/2010 6:00:40 PM] First run - need to perform setup steps.'
[5/17/2010 6:00:40 PM] Plugin 'SetupPlugin' loaded successfully.'
[5/17/2010 6:00:40 PM] Init: setup type 'SetupPlugin.Setup' v0.0.0.0 loaded'
[5/17/2010 6:00:40 PM] Setup: creating directories'
	* directory /tmp/PreApplicationStart/PreApplicationStart/App_Data/directory1 created'
	* directory /tmp/PreApplicationStart/PreApplicationStart/App_Data/logs created'
	* directory /tmp/PreApplicationStart/PreApplicationStart/App_Data/backups created'
[5/17/2010 6:00:40 PM] Init: setup successful.'
[5/17/2010 6:00:40 PM] Plugin 'SamplePlugin' loaded successfully.'
[5/17/2010 6:00:40 PM] Init: plugin type 'SamplePlugin.Sample' v0.0.0.0 loaded'
Now stop XSP by pressing ENTER and run it once again. After browsing to the site, you will now see only the following:
Event log:

[5/17/2010 6:01:33 PM] Plugin 'SamplePlugin' loaded successfully.'
[5/17/2010 6:01:33 PM] Init: plugin type 'SamplePlugin.Sample' v0.0.0.0 loaded'
Which means that our pre-application start method has noticed that initial setup had already been performed and there's no need to load the setup plugin and re-run the code.

So, not rocket science but definitely a useful feature. Sample download links:

Tags:

Mono | ASP.NET

A utility to help porting Windows .NET applications to Mono/Unix

by grendel 21. December 2009 08:43

Those of you who work or worked on porting Windows applications (any kind of them - ASP.NET, WinForms, console) might have come across a problem with case-sensitivity of file names. Windows file systems are either case-unaware and case-insensitive (the FAT family) or case-aware but case-insensitive (NTFS). In both cases applications performing I/O don't need to worry about using proper file name casing, as the underlying operating system will ignore the case and open the file without problems. This is not the case on Unix operating systems which have file systems that are both case-aware and case-sensitive.

Mono has had a solution for this problem for a long time - it's called IOMAP. It's a runtime mechanism which, if enabled by exporting the MONO_IOMAP variable, will translate not only file name case to the correct form used on disk, but will also strip DOS drive designators from the paths and translate DOS path separator character to the Unix one, thus making the application work seamlessly. The convenience comes at a price, of course, as translating the file names involves performing a lot of disk I/O to discover the real file name. So if your application is supposed to be ran on Unix most (if not all) of the time then the better to dive into the source and make sure that file names on disk are consistent with their use in the source code.

With small applications the operation is usually straight-forward and takes little time. With bigger codebases, however, it might pose a problem, especially if strings used to access files are constructed in different places of the application as opposed to being just plain literals.

For that reason I have recently created a Mono profiler module (it is somewhat of a misnomer, as the utility has little to do with code profiling) which aims at helping the developer/porter to find places in code which call .NET I/O routines passing them misformed file/directory paths as well as identify places where those strings are constructed. The former part is very simple and it merely prints to the console a stack trace leading to the I/O routine call site every time file/directory name mapping is performed. The latter part, however, is a bit more problematic as it has to deal with two separate moments in string's life - its creation and its actual use. The code uses the Mono profiler API to monitor string allocations storing all the strings created in hash tables as well as remembering the stack frame which leads to the string creation site. The code which does that is pretty fast, so it doesn't impact your application's performance too much even though it collects and stores a large amount of data (mostly pointers and some strings, though). When file name mapping is performed during file I/O, the profiler code looks up the string address and retrieves the stack trace to store it for later use. When the application exits a summary report is printed to the console which includes some statistics on the string, its original (requested) and target (mapped) form as well as a location (if it was possible to determine it) where the string was created. The location is determined using simple heuristics, so it might sometimes point to a location which is near the place where the string was created. The heuristics code walks the stack frames looking for first frame which is in application code - that is it ignores the well-known class library assemblies shipped with Mono (corlib, System*, some Mono* assemblies etc) and all the assemblies installed in the GAC. The first frame which doesn't belong in either of the above is considered to be user's code and is reported to be the string allocation location. If the stack trace doesn't contain any such frames, full trace is recorded and shown in the summary.

To take advantage of this utility you will need Mono from trunk (or 2.8 when it is released). It is advisable to compile your application with full debugging information, so that source files and line numbers can be reported (otherwise only Namespace.Class.Method will be printed). To enable the utility, make sure the MONO_IOMAP environment variable is present and set to 'all', 'case' or 'drive' and execute your application as follows:

   mono --debug --profile=iomap your_application.exe

If you're porting an ASP.NET application, use the following command line:

   MONO_OPTIONS="--debug --profile=iomap" xsp2

Below you can see output from a sample application showing the utility's behavior:

 

$ MONO_IOMAP=all mono --profile=iomap --debug iomap-report-sample.exe 
Running test: Mismatched file name case.
-=-=-=-=-=-=- MONO_IOMAP REPORT -=-=-=-=-=-=-
 - Requested file path: 'files/Test2.txt'
 -     Found file path: 'Files/test2.txt'

-= Stack Trace =-
   at System.Environment.get_StackTrace() in /usr/src/tmp/mono/mcs/class/corlib/System/Environment.cs:line 183
   at System.IO.MonoIO.GetFileAttributes(System.String , MonoIOError ByRef )
   at System.IO.MonoIO.ExistsDirectory(System.String path, MonoIOError ByRef error) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/MonoIO.cs:line 252
   at System.IO.Directory.Exists(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/Directory.cs:line 201
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/FileStream.cs:line 246
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 331
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/StreamReader.cs:line 171
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding)
   at System.IO.File.ReadAllText(System.String path, System.Text.Encoding encoding) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 542
   at System.IO.File.ReadAllText(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 537
   at app.MismatchedFileNames() in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 45
   at app.RunTest(System.String banner, System.Action test) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 24
   at app.Main(System.String[] args) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 39

-=-=-=-=-=-=- MONO_IOMAP REPORT -=-=-=-=-=-=-
 - Requested file path: '/home/grendel/Projects/work/iomap-report-sample/files'
 -     Found file path: '/home/grendel/Projects/work/iomap-report-sample/Files'

-= Stack Trace =-
   at System.Environment.get_StackTrace() in /usr/src/tmp/mono/mcs/class/corlib/System/Environment.cs:line 183
   at System.IO.MonoIO.GetFileAttributes(System.String , MonoIOError ByRef )
   at System.IO.MonoIO.ExistsDirectory(System.String path, MonoIOError ByRef error) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/MonoIO.cs:line 252
   at System.IO.Directory.Exists(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/Directory.cs:line 201
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/FileStream.cs:line 270
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 331
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/StreamReader.cs:line 171
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding)
   at System.IO.File.ReadAllText(System.String path, System.Text.Encoding encoding) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 542
   at System.IO.File.ReadAllText(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 537
   at app.MismatchedFileNames() in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 45
   at app.RunTest(System.String banner, System.Action test) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 24
   at app.Main(System.String[] args) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 39

File 1: Hello, world - test2.txt here


-=-=-=-=-=-=- MONO_IOMAP REPORT -=-=-=-=-=-=-
 - Requested file path: 'files/test.txt'
 -     Found file path: 'Files/TesT.txt'

-= Stack Trace =-
   at System.Environment.get_StackTrace() in /usr/src/tmp/mono/mcs/class/corlib/System/Environment.cs:line 183
   at System.IO.MonoIO.GetFileAttributes(System.String , MonoIOError ByRef )
   at System.IO.MonoIO.ExistsDirectory(System.String path, MonoIOError ByRef error) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/MonoIO.cs:line 252
   at System.IO.Directory.Exists(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/Directory.cs:line 201
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/FileStream.cs:line 246
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 331
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/StreamReader.cs:line 171
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding)
   at System.IO.File.ReadAllText(System.String path, System.Text.Encoding encoding) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 542
   at System.IO.File.ReadAllText(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 537
   at app.MismatchedFileNames() in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 46
   at app.RunTest(System.String banner, System.Action test) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 24
   at app.Main(System.String[] args) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 39

File 2: Hello, world - TesT here


Running test: Access from an assembly.
Reading a file.
-=-=-=-=-=-=- MONO_IOMAP REPORT -=-=-=-=-=-=-
 - Requested file path: 'fileS/tESt.txt'
 -     Found file path: 'Files/TesT.txt'

-= Stack Trace =-
   at System.Environment.get_StackTrace() in /usr/src/tmp/mono/mcs/class/corlib/System/Environment.cs:line 183
   at System.IO.MonoIO.GetFileAttributes(System.String , MonoIOError ByRef )
   at System.IO.MonoIO.ExistsDirectory(System.String path, MonoIOError ByRef error) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/MonoIO.cs:line 252
   at System.IO.Directory.Exists(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/Directory.cs:line 201
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/FileStream.cs:line 246
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 331
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/StreamReader.cs:line 171
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding)
   at System.IO.File.ReadAllText(System.String path, System.Text.Encoding encoding) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 542
   at System.IO.File.ReadAllText(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 537
   at LibClass.ReadFile(System.String dir, System.String fileName) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-lib.cs:line 12
   at app.AccessFromAssembly() in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 51
   at app.RunTest(System.String banner, System.Action test) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 24
   at app.Main(System.String[] args) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 40

-=-=-=-=-=-=- MONO_IOMAP REPORT -=-=-=-=-=-=-
 - Requested file path: '/home/grendel/Projects/work/iomap-report-sample/fileS'
 -     Found file path: '/home/grendel/Projects/work/iomap-report-sample/Files'

-= Stack Trace =-
   at System.Environment.get_StackTrace() in /usr/src/tmp/mono/mcs/class/corlib/System/Environment.cs:line 183
   at System.IO.MonoIO.GetFileAttributes(System.String , MonoIOError ByRef )
   at System.IO.MonoIO.ExistsDirectory(System.String path, MonoIOError ByRef error) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/MonoIO.cs:line 252
   at System.IO.Directory.Exists(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/Directory.cs:line 201
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/FileStream.cs:line 270
   at System.IO.FileStream..ctor(System.String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 331
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/StreamReader.cs:line 171
   at System.IO.StreamReader..ctor(System.String path, System.Text.Encoding encoding)
   at System.IO.File.ReadAllText(System.String path, System.Text.Encoding encoding) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 542
   at System.IO.File.ReadAllText(System.String path) in /usr/src/tmp/mono/mcs/class/corlib/System.IO/File.cs:line 537
   at LibClass.ReadFile(System.String dir, System.String fileName) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-lib.cs:line 12
   at app.AccessFromAssembly() in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 51
   at app.RunTest(System.String banner, System.Action test) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 24
   at app.Main(System.String[] args) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:line 40

Reading file: Hello, world - TesT here



-=-=-=-=-=-=-= MONO_IOMAP Stats -=-=-=-=-=-=-=
    Count: 2
Requested: /home/grendel/Projects/work/iomap-report-sample/fileS
   Actual: /home/grendel/Projects/work/iomap-report-sample/Files
Locations:
        LibClass:ReadFile (string,string) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-lib.cs:12

    Count: 7
Requested: fileS/tESt.txt
   Actual: Files/TesT.txt
Locations:
        LibClass:ReadFile (string,string) in /home/grendel/Projects/work/iomap-report-sample/iomap-report-lib.cs:12

    Count: 4
Requested: /home/grendel/Projects/work/iomap-report-sample/files
   Actual: /home/grendel/Projects/work/iomap-report-sample/Files
Locations:
        app:MismatchedFileNames () in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:45
        app:MismatchedFileNames () in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:45

    Count: 7
Requested: files/Test2.txt
   Actual: Files/test2.txt
Locations:
        app:MismatchedFileNames () in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:45

    Count: 7
Requested: files/test.txt
   Actual: Files/TesT.txt
Locations:
        app:MismatchedFileNames () in /home/grendel/Projects/work/iomap-report-sample/iomap-report-sample.cs:46

 

Tags:

Mono | ASP.NET | Tip

RecentComments

Comment RSS