Re: [Mono-dev] Old version of Entity Framework bundled with Mono

2015-08-08 Thread Daniel Lo Nigro
Oh interesting... I'm on Mono 4.0.2 but the old Entity Framework was still
in my GAC. I've been using Mono since 2.x though, so perhaps it was never
deleted when I upgraded? Sorry for the false alarm :)

On Sat, Aug 8, 2015 at 8:00 AM, Alexander Köplinger 
alex.koeplin...@outlook.com wrote:

 Yep, and that change shipped in Mono 4.0, so it's long gone :)


  To: mono-devel-list@lists.ximian.com
  From: kno...@gmail.com
  Date: Sat, 8 Aug 2015 14:32:47 +0200
  Subject: Re: [Mono-dev] Old version of Entity Framework bundled with Mono

 
  On 08/08/15 06:52, Daniel Lo Nigro wrote:
   I recently spend a while debugging an issue I was having with Entity
   Framework, only to find that it was happening because Mono ships with a
   beta version in its GAC. Would it be possible to either update this to
   the latest release build, or stop shipping with it and instead let
   people use their own version from NuGet? There's some bugs in the
   bundled beta that were resolved in the final release, and it's lacking
   some of the classes (for example, DbConfiguration is missing). Shipping
   an older version in the GAC is problematic as a GAC'd version of an
   assembly is always preferred over a local copy, so I needed to
   completely delete it from the GAC to get my site to work properly.
 
 
  This has already been done in the master branch:
 
 
 https://github.com/mono/mono/commit/c1bbee0b95f300df9d5d2d9e6bb3f3c162d73406
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Old version of Entity Framework bundled with Mono

2015-08-07 Thread Daniel Lo Nigro
I recently spend a while debugging an issue I was having with Entity
Framework, only to find that it was happening because Mono ships with a
beta version in its GAC. Would it be possible to either update this to the
latest release build, or stop shipping with it and instead let people use
their own version from NuGet? There's some bugs in the bundled beta that
were resolved in the final release, and it's lacking some of the classes
(for example, DbConfiguration is missing). Shipping an older version in the
GAC is problematic as a GAC'd version of an assembly is always preferred
over a local copy, so I needed to completely delete it from the GAC to get
my site to work properly.

Thanks!
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] DllImport on Mac

2014-10-19 Thread Daniel Lo Nigro
DllImport(clamav) should still work. Try running your app with
the MONO_LOG_LEVEL=debug environment variable set and see which paths it's
trying to load the library from:

MONO_LOG_LEVEL=debug mono yourapp.exe

Since your library is 64-bit (as it's in /usr/lib/x86_64/), ensure you are
running a 64-bit version of Mono. You need to either run a 64-bit Mono or
compile a 32-bit version of libclamav.

On Sun, Oct 19, 2014 at 5:13 PM, Brandon Perry bperry.volat...@gmail.com
wrote:

 I have a set of C# bindings I have written for the ClamAV project which
 work on Windows and Linux by simply DllImport(clamav).

 On mac, libclamav.6.dylib gets installed into
 /usr/lib/x86_64/libclamav.6.dylib

 I cannot for the life of my figure out how to reference this library on
 mac for a DllImport. I have tried an absolute path as well as every
 permutation of the library name as possible since DllImport will auto
 detect the extension.

 Any thoughts on referencing a dylib with DllImport? Thanks!

 --
 http://volatile-minds.blogspot.com -- blog
 http://www.volatileminds.net -- website

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Still seeking contractor to adding Tizen support to Mono

2014-06-14 Thread Daniel Lo Nigro
 in
 this case using cloud-based travis or
   drone can help
devs to
 concentrate
 on software itself without spending their
   time and
money to
 supporting
 internal CI build server.


 On Fri, 2014-06-13 at 12:24 -0700, Daniel
   Lo Nigro
wrote:
  Maybe drone could be used for
  CI.
   https://github.com/drone/drone/
 
 
  What does Drone do that other more
   common CI
systems like
 Jenkins and
  TeamCity don't do?
 
 
  On Fri, Jun 13, 2014 at 11:59 AM, Sergey
   Zhukov
s...@ngs.ru
 wrote:
  On Fri, 2014-06-13 at 09:12
   -0700, Bob
Summerwill
 wrote:
 
 
  Maybe drone could be used for
   CI.
  https://github.com/drone/drone/
 
  Also for open-source project you
   can try
travis.ci,
 but it has
  one-hour
  limit for running what can be
   critical for
running
 mono tests
  inside the
  tizen emulator.
 
  
   For Tizen at least I would
   like to get
automated
 builds and
  runs going
   within Windows Azure VMs which
   I will
sponsor
 the costs of
  runnin.
   Is there an existing
   automation
infrastructure for
 this to
  be added
   to?   Thanks!
  
  
 
 
 
 
 
___
  Mono-devel-list mailing list
 
 Mono-devel-list@lists.ximian.com
 

   
   http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 



   ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com

   
   http://lists.ximian.com/mailman/listinfo/mono-devel-list




 --
 b...@summerwill.net


   
   
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
   
   http://lists.ximian.com/mailman/listinfo/mono-devel-list
   
   
   
   
--
b...@summerwill.net
   
   
  
  
   ___
   Mono-devel-list mailing list
   Mono-devel-list@lists.ximian.com
   http://lists.ximian.com/mailman/listinfo/mono-devel-list
  
  
  
  
   --
   b...@summerwill.net
  
  
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 
 
  --
  b...@summerwill.net
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list

Re: [Mono-dev] Still seeking contractor to adding Tizen support to Mono

2014-06-13 Thread Daniel Lo Nigro

 Maybe drone could be used for CI. https://github.com/drone/drone/


What does Drone do that other more common CI systems like Jenkins and
TeamCity don't do?


On Fri, Jun 13, 2014 at 11:59 AM, Sergey Zhukov s...@ngs.ru wrote:

 On Fri, 2014-06-13 at 09:12 -0700, Bob Summerwill wrote:

 Maybe drone could be used for CI. https://github.com/drone/drone/

 Also for open-source project you can try travis.ci, but it has one-hour
 limit for running what can be critical for running mono tests inside the
 tizen emulator.

 
  For Tizen at least I would like to get automated builds and runs going
  within Windows Azure VMs which I will sponsor the costs of runnin.
  Is there an existing automation infrastructure for this to be added
  to?   Thanks!
 
 



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono and ASP.NET vNext

2014-05-17 Thread Daniel Lo Nigro
This is really exciting and I'm looking forward to trying it out! It will
be nice to run the same ASP.NET stack on Windows and Linux :)


On Tue, May 13, 2014 at 8:44 PM, Miguel de Icaza mig...@xamarin.com wrote:

 Hello guys!

 Microsoft has open sourced ASP.NET vNext:

 http://github.com/aspnet/home

 This is an entire new web stack that only needs the core of Mono (does not
 even use System.Web.dll!).

 So these are of course great news, because (a) The core Mono has been in
 active development, and (b) that means that Mono's on the server can be
 used without all those pesky limitations that have been plaguing us for
 years.

 So we ran into a couple of limitations in Mono: some classes that they
 need are not implemented (I filed a bug, and a couple of Xamarin folks
 decided to take on that on their copious spare time) and we have a couple
 of bugs on FileSystemWatcher on OSX.

 But this is a great time to:

- Get involved with the github.com/aspnet project and submit
contributions that will make the software run on Unix.

- Look into technologies like Owin and Katana (sp?) and help us have a
story that plugs into Unix HTTP servers (the equivalent of our bridge
between Apache and mono: mod_mono, or our Fast CGI bridge to mono).

- Take Mono's new profiling tools and performance counters for a spin
and help us fine tune the runtime to run .NET code faster on Unix than you
can on Windows.  While this is a tall order, my friend David Miller would
expect nothing less from us.

 Hugs and love,
 Miguel

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] NullReferenceException in XSP after updateing mono

2014-05-12 Thread Daniel Lo Nigro
The closest category in Bugzilla is probably Class libraries -- Sys.Web.

How are you running XSP?


On Sat, May 10, 2014 at 1:52 AM, artyom.sz...@gmail.com 
artyom.sz...@gmail.com wrote:

 After updating mono to master HEAD I can no longer run any asp
 applications.

 Nothing else has been changed, only git pull/autogen.sh/make/make install
 (+rebuild xsp) in local mono git repository.

 Now any attempt to run XSP (both from monodevelop and standalone version)
 results is NullReferenceException

  at (wrapper xdomain-invoke) Mono.WebServer.XSP.Server:DebugMain
 (string[],bool,Mono.WebServer.IApplicationHost,bool)


 The problem can be fixed by reverting changes to the previous reflog
 (fc061e3).

 I wanted to create a bug at https://bugzilla.xamarin.com/ but not sure
 which component it might be related to.

 Any help is appreciated.

 --
 Artyom Antyipin

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Unix-sockets Mono.WebServer.FastCgi

2014-02-19 Thread Daniel Lo Nigro
That sounds like a bug - It's probably worth reporting it as such.


On Mon, Feb 17, 2014 at 10:36 PM, SirNoSkill quandar...@hailmail.netwrote:

 Hi,

 I downloaded the sources for XSP from git.
 And it seems Mono.WebServer.FastCgi has been under quite a bit of
 change.
 First I wanted to thank the person(s) responsible for it, seems like the
 fastcgi server is finally stable, or at least stable enough that it
 hasn't crashed once in the last 2 weeks, including a performance load
 test.
 Keep up the good work.

 One thing though:
 It worked fine with TCP, but when I tried with unix sockets, I got this
 error:
 Error parsing permissions . Use octal.

 In file
 /xsp/src/Mono.WebServer.FastCgi/main.cs
 in function public static bool TryCreateUnixSocket (string path, out
 Socket socket, string perm = null)

 there is this code:
 if (perm == null) {
 socket = new UnixSocket (realPath);
 Logger.Write (LogLevel.Debug, Listening on file {0} with default
 permissions, realPath);
 } else {
 ushort uperm;
 if (!UInt16.TryParse (perm, out uperm)) {
 Logger.Write (LogLevel.Error, Error parsing permissions
 \{0}\. Use octal., perm);
 return false;
 }


 that should probably be
 if(string.IsNullOrEmpty(perm)){
 because UInt16.TryParse will fail if perm is string.Empty.

 If I fix this, fastcgi-server starts, but I get a HTTP 502.
 Since the config works fine if I use TCP, I guess this is a
 fastcgi-server bug.
 Just thought I let you know.

 It's unlikely it's a permission bug, since I let fastcgi-mono-server4
 run as root.
 Just in case, here my configuration settings:

 This is my fastcgi-start script

 #!/bin/sh

 ### BEGIN INIT INFO
 # Provides:  monoserve.sh
 # Required-Start:$local_fs $syslog $remote_fs
 # Required-Stop: $local_fs $syslog $remote_fs
 # Default-Start: 2 3 4 5
 # Default-Stop:  0 1 6
 # Short-Description: Start fastcgi mono server with hosts
 ### END INIT INFO

 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/bin/mono
 NAME=monoserver
 DESC=monoserver

 MONOSERVER=$(which fastcgi-mono-server4)
 MONOSERVER_PID=$(ps auxf | grep fastcgi-mono-server4.exe | grep -v grep
 | awk '{print $2}')

 WEBAPPS=www.example.com:
 /:/root/VS2010/SqlWebAdmin/SqlWebAdmin/,example.com:
 /:/root/VS2010/SqlWebAdmin/SqlWebAdmin/

 #WEBAPPS=www.domain1.xyz:/:/var/www/domain1.xyz/,www.domain2.xyz:/:/var/www/domain2.xyz/

 case $1 in
 start)
 if [ -z ${MONOSERVER_PID} ]; then
 echo starting mono server


 # ${MONOSERVER} /applications=${WEBAPPS}
 /socket=unix:/tmp/fastcgi.socket 
 # ${MONOSERVER} /applications=${WEBAPPS}
 /socket=tcp:127.0.0.1:9000 
 ${MONOSERVER} /applications=${WEBAPPS}
 /socket=unix:/var/run/mono3-fcgi.sock 
 echo mono server started
 else
 echo ${WEBAPPS}
 echo mono server is running
 fi
 ;;
 stop)
 if [ -n ${MONOSERVER_PID} ]; then
 kill ${MONOSERVER_PID}
 echo mono server stopped
 else
 echo mono server is not running
 fi
 ;;
 *) echo You have provided no or an invalid command line
 argument.
 ;;
 esac

 exit 0



 and this the nginx configuration


 ##
 # You should look at the following URL's in order to grasp a solid
 understanding
 # of Nginx configuration files in order to fully unleash the power of
 Nginx.
 # http://wiki.nginx.org/Pitfalls
 # http://wiki.nginx.org/QuickStart
 # http://wiki.nginx.org/Configuration
 #
 # Generally, you will want to move this file somewhere, and start with a
 clean
 # file but keep this around for reference. Or just disable in
 sites-enabled.
 #
 # Please see /usr/share/doc/nginx-doc/examples/ for more detailed
 examples.
 ##


  server {
  listen   80;
  server_name www.example.com example.com;
  access_log   /var/log/nginx/your.domain1.xyz.access.log;

  location / {
  root /root/VS2010/SqlWebAdmin/SqlWebAdmin;
  #index index.html index.htm default.aspx Default.aspx;
  #fastcgi_index Default.aspx;
  #fastcgi_pass 127.0.0.1:9000;
  fastcgi_pass unix:/var/run/mono3-fcgi.sock;
  include /etc/nginx/fastcgi_params;
  }




 location /doc {
 root /usr/share;
 autoindex on;
 allow 127.0.0.1;
 deny all;
 }

 location /shared_images {
 root /usr/share;
 autoindex off;
 }

 error_page 404 /CustomErrors/404.htm;

 # redirect server error pages 

Re: [Mono-dev] Updated Mono class status pages?

2013-12-04 Thread Daniel Lo Nigro
Do you know if there's any plans to update the site? It's a really handy
reference to see what's implemented in Mono.


On Tue, Nov 26, 2013 at 11:07 AM, Rodrigo Kumpera kump...@gmail.com wrote:

 They are dead, you can use the desktop tool replacement in the mono-tools
 repository.


 On Thu, Nov 21, 2013 at 1:22 PM, Alexander Köplinger 
 alex.koeplin...@outlook.com wrote:

 Are the class status pages on http://go-mono.com/status actively
 maintained or is there another site?

 Most pages there state that the last update was ~2 years ago.



 Regards,

 Alex

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Help with xsp

2013-09-19 Thread Daniel Lo Nigro

 Just out of curiosity why does add subtract one from the Count in the Add
 method?


The Add method returns the zero-based index of the new item, which is one
less than the count (that is, the last item in a collection of 10 items is
at index 9).



On Thu, Sep 19, 2013 at 7:14 AM, Neale Ferguson
nealefergu...@verizon.netwrote:

 Thanks Robert.

 Using --debug shows:

   at System.Web.Services.Description.MessageCollection.get_Item (Int32
 index) [0x00019] in

 /home/BUILD/mono-3.2.3/mcs/class/System.Web.Services/System.Web.Services.Des
 cription/MessageCollection.cs:50

 Which corresponds to the throw below. Just out of curiosity why does add
 subtract one from the Count in the Add method?

 public Message this [int index] {
 get {
 if (index  0 || index  Count)
 throw new
 ArgumentOutOfRangeException ();

 return (Message) List [index];
 }
 set { List [index] = value; }
 }

 public Message this [string name] {
 get { return this [IndexOf ((Message) Table
 [name])]; }
 }

 #endregion // Properties

 #region Methods

 public int Add (Message message)
 {
 Insert (Count, message);
 return (Count - 1);
 }



 On 9/18/13 5:08 AM, Robert Jordan robe...@gmx.net wrote:

  Neale,
 
  On 18.09.2013 00:19, Neale Ferguson wrote:
  I had a webservice that was working fine. I duplicated a routine - same
 name
  but with different parameters which requires the MessageName attribute.
 So
  for the duplicated routine which originally just had:
   [WebMethod (Description=Process VMARCH QUERY TAPES ALL
  command)]
  I changed it to
   [WebMethod (Description=Process VMARCH QUERY TAPES ALL
  command,
   MessageName=vmaQryTapesAll)]
 
  Pointed browser to: http://localhost:9000/webservice.asmx and now get:
 
  System.ArgumentOutOfRangeException
  Argument is out of range.
 
  Is there some way to get more informative messages from xsp to get it to
  tell me exactly what it's choking on? I can invoke the webmethods
 directly
  on the browser but it's just this bit that is giving me grief.
 
  The Web Service overview and test page is generated by
  $prefix/etc/mono/x.x/DefaultWsdlHelpGenerator.aspx,
  where x.x is the .NET version.
 
  It looks like the exception is thrown when Page_Load of this
  ASPX page is invoking WebServicesInteroperability.CheckConformance.
 
  That's where I would start looking for issue with overloaded
  WebMethods following back the stack trace.
 
  Try to get line numbers with
 
  MONO_OPTIONS=--debug xsp ...
 
  Robert
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Help with xsp

2013-09-19 Thread Daniel Lo Nigro
I can confirm that I get the same error using Mono 3.0.7. I'd suggest
raising it as a bug in the Mono bug tracker.


On Fri, Sep 20, 2013 at 3:10 AM, Neale Ferguson
nealefergu...@verizon.netwrote:

 At the bottom is the minimal test case that results in the error. If you
 rename the 2nd testIt to something else and get rid of the
 (MessageName...),
 there's no problem.

 Would someone try it on there platform to check that it's not something
 I've
 done on my system?

 The problem appears to be when
 System.Web.Services.Description.BasicProfileChecker.CheckR2305 invokes
 System.Web.Services.Description.MessageCollection.get_Item using the string
 TestInt. The IndexOf comes back with -1 which triggers the throw. The
 call
 to IndexOf is:

 [  6] . . . . . . ENTER:
 System.Web.Services.Description.MessageCollection:IndexOf
 (System.WebDescription.Message) ip: 0x3ffd725d0ac sp: 0x3fff4b13a98 -
 this[MONO_TYPE_CLASS]: 0x3ffd767ae3:null],ECTT


 public Message this [int index] {
 get {
 if (index  0 || index  Count)
 throw new
 ArgumentOutOfRangeException ();

 return (Message) List [index];
 }
 set { List [index] = value; }
 }

 public Message this [string name] {
 get { return this [IndexOf ((Message) Table
 [name])]; }
 }

 The trace shows:

 [  6] . . . . . . ENTER:
 System.Web.Services.Description.MessageCollection:IndexOf
 (System.WebDescription.Message) ip: 0x3ffd725d0ac sp: 0x3fff4b13a98 -
 this[MONO_TYPE_CLASS]: 0x3ffd767ae3:null],ECTT

 As far as I can see from the trace, List.Insert is never called to put
 things into the table.

 ---

 %@ WebService Language=C# Class=TestService.Testing %

 using System;
 using System.Web.Services;
 using System.Xml;
 using System.Runtime.InteropServices;

 namespace TestService
 {
 [WebService (Namespace=http://localhost/TestService;,
  Description=Webservice test case)]
 public class Testing : WebService
 {
 [WebMethod]
 public XmlDocument testIt()
 {
 XmlDocument doc = new XmlDocument();
 doc.LoadXml(TESTTest Data/TEST);

 return(doc);
 }
 [WebMethod (MessageName=testInt)]
 public XmlDocument testIt(int a)
 {
 XmlDocument doc = new XmlDocument();
 if (a == 0)
 doc.LoadXml(TESTTest 0/TEST);
 else
 doc.LoadXml(TESTTest !0/TEST);

 return(doc);
 }
 }
 }


 On 9/18/13 5:08 AM, Robert Jordan robe...@gmx.net wrote:

  Neale,
 
  On 18.09.2013 00:19, Neale Ferguson wrote:
  I had a webservice that was working fine. I duplicated a routine - same
 name
  but with different parameters which requires the MessageName attribute.
 So
  for the duplicated routine which originally just had:
   [WebMethod (Description=Process VMARCH QUERY TAPES ALL
  command)]
  I changed it to
   [WebMethod (Description=Process VMARCH QUERY TAPES ALL
  command,
   MessageName=vmaQryTapesAll)]
 
  Pointed browser to: http://localhost:9000/webservice.asmx and now get:
 
  System.ArgumentOutOfRangeException
  Argument is out of range.
 
  Is there some way to get more informative messages from xsp to get it to
  tell me exactly what it's choking on? I can invoke the webmethods
 directly
  on the browser but it's just this bit that is giving me grief.
 
  The Web Service overview and test page is generated by
  $prefix/etc/mono/x.x/DefaultWsdlHelpGenerator.aspx,
  where x.x is the .NET version.
 
  It looks like the exception is thrown when Page_Load of this
  ASPX page is invoking WebServicesInteroperability.CheckConformance.
 
  That's where I would start looking for issue with overloaded
  WebMethods following back the stack trace.
 
  Try to get line numbers with
 
  MONO_OPTIONS=--debug xsp ...
 
  Robert
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] latest mono from git now builds on the latest cygwin

2013-09-10 Thread Daniel Lo Nigro
Could it be packaged as a Cygwin package and hosted on the official Mono
site? All the standard Cygwin apps are installed via packages.

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 09/09/2013 2:31 AM, mlgo mlint...@sinenomine.net wrote:

 Props and thanks to Zoltan. I successfully build this morning after seeing
 some new patches just went in. I did  a git pull, configure and make. I did
 not even make clean. It worked with no problem. Well maybe one, it didn't
 see that I had mono installed already so I had to get monolite and do the
 bootstrap make. No huge problem. It built and installed perfectly after
 that. That is just following instructions from github for when you do not
 have a current mono when installing. I could have my environment messed up
 now because 3 mono versions actually exist.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/latest-mono-from-git-now-builds-on-the-latest-cygwin-tp4660821.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Need help for setup SSL in Apache mod-mono

2013-09-10 Thread Daniel Lo Nigro
That's standard Apache setup; there's nothing Mono-specific that needs to
be done :)

I'd suggest posting to an Apache mailing list or forum. But before doing
that, consult their official documentation and see if it helps.


On Fri, Sep 6, 2013 at 11:59 PM, Senthil Kumar G sent...@zoniac.com wrote:

 Hi

 ** **

 Our requirement is, we need to setup SSL in Apache mon-mono.

 Which mailing list should I contact for help?

 Can anyone help me on this?

 Thanks.

 ** **

 Regards

 Senthil

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] latest mono from git now builds on the latest cygwin

2013-09-08 Thread Daniel Lo Nigro
Could it be packaged as a Cygwin package and hosted on the official Mono
site? All the standard Cygwin apps are installed via packages.


On Mon, Sep 9, 2013 at 2:30 AM, mlgo mlint...@sinenomine.net wrote:

 Props and thanks to Zoltan. I successfully build this morning after seeing
 some new patches just went in. I did  a git pull, configure and make. I did
 not even make clean. It worked with no problem. Well maybe one, it didn't
 see that I had mono installed already so I had to get monolite and do the
 bootstrap make. No huge problem. It built and installed perfectly after
 that. That is just following instructions from github for when you do not
 have a current mono when installing. I could have my environment messed up
 now because 3 mono versions actually exist.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/latest-mono-from-git-now-builds-on-the-latest-cygwin-tp4660821.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] A possible implementation for AssemblyName.ReferenceMatchesDefinition

2013-08-28 Thread Daniel Lo Nigro
To reach the Entity Framework developers, I'd suggest posting to their
discussion forums: http://entityframework.codeplex.com/discussions


On Wed, Aug 28, 2013 at 9:30 PM, mlgo mlint...@sinenomine.net wrote:



 Thanks, I had seen that link already. How would I find Entity Framework
 developers?



   It looks like EF is using it to while iterating through the
 cache to select the assembly which matches the assemblyname being passed
 in. The function it is used in is

 DefaultAssemblyResolver.ResolveAssembly and they use it as follows:



 // look in the already loaded assemblies
 foreach (var current in GetAlreadyLoadedNonSystemAssemblies())
 {
 if (AssemblyName.ReferenceMatchesDefinition(referenceName, 
 new AssemblyName(current.FullName)))
 {
 return current;
 }
 }


 I had been looking at that link but it contradicts even the MSDN
 description. It seems obvious that without logic to take version into
 account the version it cannot resolve a correct from incorrect dll.



 http://stackoverflow.com/questions/2494421/how-does-assemblyname-referencematchesdefinition-work

 I was digging around on that link Somewhere on that page there is a
 response by some other Microsoft developers, which give an explanation of
 the compare which at least would be able to tell one dll from another in a
 meaning full way which lead me to change the implementation to the
 following:

 public static bool ReferenceMatchesDefinition (AssemblyName reference,
  AssemblyName definition)
  {
  if (reference == null)
  throw new ArgumentNullException
 (reference);

  if (definition == null)
  throw new ArgumentNullException
 (definition);

 if (!reference.Name.Equals(definition.Name,
 StringComparison.InvariantCultureIgnoreCase))
 {
   return false;
 }

 //
 http://stackoverflow.com/questions/2494421/how-does-assemblyname-referencematchesdefinition-work
 // A ReferenceIdentity matches a
 DefinitionIdentity, if and only if the value of all the attributes
 // specified in the ReferenceIdentity match the
 value of the corresponding attributes of the DefinitionIdentity.
 // If an attribute is missing in the
 ReferenceIdentity, it matches any value for that attribute in
 DefinitionIdentity.
 // For example, Ref “name” matches Def “name,
 culture=neutral”, and Def “name, culture=en-us”.
 // But Ref “name, culture=neutral” does not match
 Def “name, culture=en-us”.
 if (reference.CultureInfo != null)
 {
   if (definition.CultureInfo == null ||
 reference.CultureInfo != definition.CultureInfo )
   {
return false;
   }
 }.


byte [] refToken = reference.GetPublicKeyToken();
if (refToken != null  refToken.Length != 0)
{
  byte [] defToken = definition.GetPublicKeyToken();
  if (deftoken == null || defToken.Length != 4 ||
  refToken[0] != defToken[0] || refToken[1] !=
 defToken[1]  ||
  refToken[2] != defToken[2]  || refToken[3] !=
 defToken[3]  )
   {
return false;
   }

 if (reference.Version != null)
  {
if (definition.Version == null ||
 reference.Version != definition.Version )
 {
  return false;
 }
  }

}

 return true ;
  }

 Don't know how Im going to find entity Framework developers. I always will
 write Unit Tests of course.
  --
 *From:* Marek Safar-2 [via Mono] [ml-node+[hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4660697i=0
 ]
 *Sent:* Wednesday, August 28, 2013 2:21 AM

 *To:* Mark Lintner
 *Subject:* Re: A possible implementation for
 AssemblyName.ReferenceMatchesDefinition

   Hi,

  This API is broken by design and it's not clear what it should really
 do. It'd probably be better to check with EF devs whether they really
 intended to use it and for what purposes. Even for naive implementation
 please write unit test and check whether it passes on .net


 http://stackoverflow.com/questions/2494421/how-does-assemblyname-referencematchesdefinition-work

  Marek



 On Tue, Aug 27, 2013 at 5:29 PM, mlgo [hidden 
 

Re: [Mono-dev] A possible implementation for AssemblyName.ReferenceMatchesDefinition

2013-08-27 Thread Daniel Lo Nigro
You may want to ignore culture and case in your comparison:

return reference.Name.Equals(definition.Name,
StringComparison.InvariantCultureIgnoreCase)



On Wed, Aug 28, 2013 at 1:29 AM, mlgo mlint...@sinenomine.net wrote:

 According to

 http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx

 The following is what is expected to be returned from
 ReferenceMatchesDefinition.

 Returns a value indicating whether two assembly names are the same. The
 comparison is based on the simple assembly names.

 This seems naïve but below is a tentative implementation of that. Any
 ideas?

 public static bool ReferenceMatchesDefinition (AssemblyName reference,
 AssemblyName definition)
 {
 if (reference == null)
 throw new ArgumentNullException
 (reference);
 if (definition == null)
 throw new ArgumentNullException
 (definition);
 if (reference.Name != definition.Name)
 return false;

 return reference.Name.Equals(definition.Name);
 }




 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] A possible implementation for AssemblyName.ReferenceMatchesDefinition

2013-08-27 Thread Daniel Lo Nigro
It looks like the behaviour may have changed between .NET versions... The
MSDN page for .NET Framework 3.5 onwards (including 4.5) states:

Returns a value indicating whether two assembly names are the same. The
 comparison is based on the simple assembly names.
 return value - true if the simple assembly names are the same; otherwise,
 false.
 The comparison depends only on the simple assembly name. It ignores
 version, culture, and public key token.


But the .NET Framework 2.0
pagehttp://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition(v=vs.80).aspxstates:

Returns a value indicating whether the loader resolves two assembly names
 to the same assembly.
 Return Value - true if the loader resolves definition to the same assembly
 as reference; otherwise, false.
 Both reference and definition are resolved by the loader, including policy
 evaluation, and then definition is tested for equality to reference.


It sounds like it did a lot more work in the .NET 2.0 implementation. Not
sure why it changed and I can't seem to find much information on it.



On Wed, Aug 28, 2013 at 10:46 AM, mlgo mlint...@sinenomine.net wrote:

  Right. Thanks. I hadn't thought about that. I keep suspecting that the
 documentation is not right though. That in fact what needs to be done is
 determine if the names actually refer to the same dll. Hopefully someone
 can reply to this who knows more about the internals of this. Otherwise
 I need to find some more real world uses of it in dotnet source code so I
 can better understand if this is the right way to go.
 --

  *From:* Daniel Lo Nigro [via Mono] [ml-node+[hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4660692i=0
 ]
 *Sent:* Tuesday, August 27, 2013 7:20 PM
 *To:* Mark Lintner
 *Subject:* Re: A possible implementation for
 AssemblyName.ReferenceMatchesDefinition

   You may want to ignore culture and case in your comparison:

  return reference.Name.Equals(definition.Name,
 StringComparison.InvariantCultureIgnoreCase)



 On Wed, Aug 28, 2013 at 1:29 AM, mlgo [hidden 
 email]https://connect.emailsrvr.com/owa/UrlBlockedError.aspx
  wrote:

 According to

 http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.referencematchesdefinition.aspx

 The following is what is expected to be returned from
 ReferenceMatchesDefinition.

 Returns a value indicating whether two assembly names are the same. The
 comparison is based on the simple assembly names.

 This seems naïve but below is a tentative implementation of that. Any
 ideas?

 public static bool ReferenceMatchesDefinition (AssemblyName reference,
 AssemblyName definition)
 {
 if (reference == null)
 throw new ArgumentNullException
 (reference);
 if (definition == null)
 throw new ArgumentNullException
 (definition);
 if (reference.Name != definition.Name)
 return false;

 return reference.Name.Equals(definition.Name);
 }




 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 [hidden email] https://connect.emailsrvr.com/owa/UrlBlockedError.aspx
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



 ___
 Mono-devel-list mailing list
 [hidden email] https://connect.emailsrvr.com/owa/UrlBlockedError.aspx
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683p4660691.html
  To unsubscribe from A possible implementation for
 AssemblyName.ReferenceMatchesDefinition, click here.
 NAMLhttp://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml

 --
 View this message in context: RE: A possible implementation for
 AssemblyName.ReferenceMatchesDefinitionhttp://mono.1490590.n4.nabble.com/A-possible-implementation-for-AssemblyName-ReferenceMatchesDefinition-tp4660683p4660692.html

 Sent from the Mono - Dev mailing list 
 archivehttp://mono.1490590.n4.nabble.com/Mono-Dev-f1517221.htmlat 
 Nabble.com.

 ___
 Mono-devel-list mailing

Re: [Mono-dev] Random mono apache errors

2013-08-26 Thread Daniel Lo Nigro

 1. Use the open source way, find and fix it myself and hope that we will
 have this change in the official mono one day.


I've fixed a few bugs with Mono (most around the ASP.NET routing
implementation) and I've found that the Mono developers are pretty good
with pull requests. If you do a good fix, it's very likely to make it into
a release of Mono. The 3.x series is having more frequent releases compared
to the 2.10.x series.


On Mon, Aug 26, 2013 at 8:16 PM, Vladimir Dimitrov
vlad.dimit...@gmail.comwrote:

  Almost the same thing just happened again. I got this error when calling
 a web service on the apache/mono server:

 System.Exception: INTERNAL configuration error: failed to get
 configuration 'system.diagnostics'
   at System.Diagnostics.DiagnosticsConfiguration.get_Settings () [0x0]
 in filename unknown:0
   at System.Diagnostics.TraceImpl.InitOnce () [0x0] in filename
 unknown:0
   at System.Diagnostics.TraceImpl.get_Listeners () [0x0] in filename
 unknown:0
   at System.Diagnostics.TraceImpl.get_ListenersSyncRoot () [0x0] in
 filename unknown:0
   at System.Diagnostics.TraceImpl.WriteLine (System.String message)
 [0x0] in filename unknown:0
   at System.Diagnostics.Debug.WriteLine (System.String format,
 System.Object[] args) [0x0] in filename unknown:0
   at Warehouse.Data.Str.WriteDebugMessage (System.String message,
 System.Object[] args) [0x0] in filename unknown:0
   at Warehouse.Portal.Sync.Api.SyncPoll.GetCommand (System.Byte[] encIV,
 System.Byte[] encKey, System.Byte[] encParams) [0x0] in filename
 unknown:0
   at (wrapper managed-to-native)
 System.Reflection.MonoMethod:InternalInvoke
 (System.Reflection.MonoMethod,object,object[],System.Exception)
   at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
 invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
 System.Globalization.CultureInfo culture) [0x0] in filename unknown:0

 after sudo service apache2 restart everything continued to work properly.
 Something causes the configuration to become messed up in (what looks
 like) random or heavy load situations and this makes everything go south.

 Unfortunately it looks like this part of mono is not in the primary (or
 maybe in no) focus for the Xamarin team so my best bet here is to:
 1. Use the open source way, find and fix it myself and hope that we will
 have this change in the official mono one day.
 2. Move to a Windows server with IIS which I know is not a secondary focus
 for MS.

 - Vladimir


 On 21.8.2013 г. 16:16 ч., Vladimir Dimitrov wrote:

 I got to this point in the sources too, but I have no idea what I can do
 or why didn't many other people got the same problem?

 On 21.8.2013 г. 15:20 ч., Rafael Teixeira wrote:

 From sources (
 https://github.com/mono/mono/blob/master/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs
 ):


   if (key == wsdl || key == schema || key == code 
 || key == disco)
   return;

 #if NET_2_0

   string help = 
 WebServicesSection.Current.WsdlHelpGenerator.Href;
   string path = Path.GetDirectoryName 
 (ConfigurationManager.OpenMachineConfiguration().FilePath);
 #else

   string help = WSConfig.Instance.WsdlHelpPage;
   string path = Path.GetDirectoryName 
 (WSConfig.Instance.ConfigFilePath);
 #endif
   *...*
   string physPath = Path.Combine (path, help);


  So probably WebServicesSection.Current.WsdlHelpGenerator.Href is
 returning null or ConfigurationManager.OpenMachineConfiguration().FilePath
 is returning null.

  For the first case, as this is read from current configuration which can
 be reread from time to time as any part of the configuration chain changes
 it is possible that either some of those MonoTodos in
 https://github.com/mono/mono/blob/master/mcs/class/System.Web.Services/System.Web.Services.Configuration/WsdlHelpGeneratorElement.cs?source=cc
  are
 making things flaky:

  [MonoTODO (probably verifies the Href property here, after 
 deserializing?)]


   protected override void DeserializeElement (XmlReader reader, 
 bool serializeCollectionKey)
   {
   base.DeserializeElement (reader, 
 serializeCollectionKey);
   }
   [MonoTODO]
   protected override void Reset (ConfigurationElement 
 parentElement)
   {
   base.Reset (parentElement);
   }


  or some locking is missing to avoid reading an incomplete current
 configuration instance...

  As for the second case after much navigating through sources it comes
 down to calling an internal call 'string get_machine_config_path ()'
 which I don't have time now to try to explore...

  Hope it helps,

 Rafael Teixeira
 O..:.)


 On Wed, Aug 21, 2013 at 8:05 

Re: [Mono-dev] Request for status of Entity framework on Mono

2013-08-18 Thread Daniel Lo Nigro
There's no official release of Entity Framework 6 yet, the latest release
is the first beta release. Additionally, I don't think all the supporting
architecture is fully working in Mono yet. You could try it and see,
although I'd use Entity Framework from NuGet as the one bundled with Mono
is out of date.

If you only need basic features, I'd suggest looking at a micro ORM like
ServiceStack ORMLite, Dapper, or Massive. These are all very basic facades
over raw ADO.NET, usually providing only basic ORM. I use ORMLite with Mono
and it works quite well.


On Mon, Aug 19, 2013 at 7:16 AM, Martin Thwaites
monofo...@my2cents.co.ukwrote:

 I'm starting a new project from scratch soon, and I'm selecting some
 components.  I do everything in mono.. you'll be pleased to hear ;)

 For ORM, I'm looking to utilise EntityFramework, so I'm wondering where
 the development is at, is anyone working on it, etc.

 I don't think I'll be using any advanced features, just the basics.  So,
 are the basics in enough of a usable state to put into a production
 application?

 I'm not seeing any stabilisation branches/tags in the repository, so can I
 assume that it's still in flux and should be avoided for the timebeing?

 I'll obviously give it a go and see, but just wondering if anyone has any
 experiences?

 Thanks in advance.
 Martin


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] error executing the compiled EXE edited Mono Inside Windows Environment

2013-08-07 Thread Daniel Lo Nigro
What was the exact error message you got?


On Thu, Aug 1, 2013 at 3:49 AM, bpescarolli bruno.pescaro...@hotmail.comwrote:

 I created a HelloWord.exe (application interface gtk 2.0) in Mono within my
 Lubuntu 13.04
 I caught this one Release executable tried run it on a machine with Win XP
 .. just curious, with. NET installed.

 and returns an error like Unable to start HelloWord.exe ...

 how do I create an application within my Lubuntu Mono that runs on both
 Windows Environments with. NET installed or Linux environments that have
 the
 Wine or Mono runtime installed?

 I have to have installed on my Mono Winforms? makes if yes how?

 Help me , please!



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/error-executing-the-compiled-EXE-edited-Mono-Inside-Windows-Environment-tp4660343.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] NancyFX self hosting (HttpListener) locking up on linux

2013-08-04 Thread Daniel Lo Nigro
I've noticed the same issue with self-hosted ASP.NET WebAPI, which is
probably the same underlying cause.


On Sun, Aug 4, 2013 at 11:07 AM, Alfred Hall ah...@ahall.org wrote:

 **
 Hi there.

 I'm running the NancyFX web framework in self hosting mode which is using
 HttpListener which basically means I deploy an executable and run it and it
 will start a webserver on localhost on a TCP port of choice. I then use
 nginx to proxy to it.

 I first ran my executable on my macbook pro and bombarded it with jmeter
 and it coped fine and no issues.
 I then deployed on my debian wheezy 64 bit linux box running on top of KVM
 using mono 3.2.0 and performed the same jmeter experiment. It locks up
 fairly quickly and wont take any new requests. I've tried using both sgen
 and boehm but they behave similarly although it seems to lock up faster
 when using sgen. I also tried enabling MONO_DISABLE_AIO but it doesn't
 make any difference.

 Anyone had similar issues?

 I tried using self hosted ServiceStack which also uses HttpListener and
 had similar issues so I'm finding it unlikely that the bug is in NancyFX
 itself.

 I tried installing mono 2.10.8 to check if this is a regression, but
 getting exactly the same results.

 Any idea how I can debug this further or what could be going on.

 Cheers,
 Alf

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Debugging mono executables, dlls through attach to process

2013-07-26 Thread Daniel Lo Nigro
I haven't tried it, but you may be able to use a
System.Diagnostics.Debugger.Break() call in your code.


On Wed, Jul 24, 2013 at 6:52 PM, panchdev panch...@hotmail.com wrote:

 Hi,

 I need to debug mono executables, dlls through attach to process feature on
 windows.
 I have cloned and built monodevelop 4.1.7 attach but atatch to process
 feature is not available.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Debugging-mono-executables-dlls-through-attach-to-process-tp4660277.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Status of HttpContext.AcceptWebSocketRequest ?

2013-07-06 Thread Daniel Lo Nigro
WebSockets use a totally different protocol, it doesn't use HTTP other than
for the initial handshake. It's easy for the Microsoft .NET Framework to
support it as they can just hook into IIS directly and extend it to support
WebSockets. It'd be a lot harder to do in Mono as support for WebSockets
needs to be supported by the web server itself You could probably do it in
pure Mono (eg. extend XSP to support websockets) but the WebSocket server
would have to be on a different port or different IP to the main web
server. All implementations I've seen have taken similar approaches -
Socket.io hooks into the server component of Node.js for example.

Worth noting that Nginx 1.4 supports proxying websockets (see eg.
http://siriux.net/2013/06/nginx-and-websockets/ and
https://chrislea.com/2013/02/23/proxying-websockets-with-nginx/) so your
Mono websocket server could be sitting on a different port and Nginx could
proxy to it.


On Tue, Jun 25, 2013 at 4:14 PM, SirNoSkill quandar...@hailmail.net wrote:

 Question:

 I was playing around with MVC4  websockets on mono3.
 I copied a simple echo example using websockets, and a chat
 example using Microsoft.WebSockets, first had to make them work on
 Windows
 since they were written using some CTP versions of .NET 4.5.

 I was astonished most things were implemented.
 However, apart from the runtime-bug HttpApplication-GetType not
 implemented,
 which seems to be easy enough to fix myself, there were 2 methods not
 implemented.
 HttpContext.AcceptWebSocketRequest
 and
 HttpContext.IsWebSocketRequest


 Now I'm sure IsWebSocketRequest is just a simple formality,
 but regarding AcceptWebSocketRequest I am wondering.

 Because my understanding is that AcceptWebSocketRequest registers a
 user-defined callback function in IIS8, and mono would need to register
 this function for several backends, like xsp4, Nginx +
 fastcgi-mono-server4,
 Apache + mod_mono, IIS, etc.

 So here my question:
 Has this just been left out because it is difficult/time-consuming,
 or is it not implemented on purpose ?



 --
   SirNoSkill
   quandar...@hailmail.net

 --
 http://www.fastmail.fm - One of many happy users:
   http://www.fastmail.fm/help/overview_quotes.html

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] mono WebResponse caching

2013-06-10 Thread Daniel Lo Nigro

 It appears that LastModified is always set to the datetime when the
 response comes back from the server


It's up to the server to set the Last-Modified header correctly.
ASP.NETsets it to the current date by default, but pages can override
this.

What I meant with my nice to have was cache revalidation using
Last-Modified. To do this, you save the Last-Modified value along with the
cached response. When your cache is expiring, you send a request to the
server, with an If-Modified-Since header containing the cached
Last-Modified value. If the server responds with 304 Not Modified, it
means the cached version is still valid, and you can extend its validity
rather than purging it. This can also be done with ETags by using the
If-None-Match request header.

Worth noting that for a standards-compliant caching implementation, if the
Cache-Control header contains must-revalidate, you must send a request
back to the server once the cache expires, with If-Modified-Since
containing the Last-Modified value (and If-None-Match containing the ETag
value). You can only reuse the cached version if the server responds with
304 Not Modified.

Caching is tricky to get right, would definitely be worth having some unit
tests around this. This page has a fantastic reference on Cache-Control
headers and what they do. Definitely worth reading:
http://www.mnot.net/cache_docs


On Tue, Jun 11, 2013 at 11:27 AM, Mark Lintner mlint...@sinenomine.netwrote:

  Good ideas. The MemoryCache in System.Runtime.Caching seems interesting
 but it is for our purposes inaccessible because the dll it lives in has  a
 dependency on the System.dll and System.dll already has 3 cross
 dependencies. Still its not impossible. It seems like everything in the
 Cache-Control header is important. That's where max-age it. Ive already got
 no-cache implemented and it looks like max-age=0 means the same thing. It
 appears that LastModified is always set to the datetime when the response
 comes back from the server. You mention that it would be nice to have. Does
 that mean it is not working correctly. I haven't checked whether the value
 is different on Microsoft. I still don't understand how Microsofts web
 cache works. It is persistent in the sense that it is putting the urls in a
 directory. The urls have illegal file names. What is interesting is that
 the speed with which it returns a cached url is roughly equivalent to a
 Dictionary based cache I was testing.


 --

  *From:* dan...@d15.biz [dan...@d15.biz] on behalf of Daniel Lo Nigro [
 li...@dan.cx]
 *Sent:* Sunday, June 09, 2013 7:36 AM
 *To:* Mark Lintner
 *Cc:* Greg Young; mono-devel-list@lists.ximian.com

 *Subject:* Re: [Mono-dev] mono WebResponse caching

   There'd be some code for output caching in Mono's ASP.NETimplementation, I 
 wonder if any of it could be reused here. They're
 different concepts (ASP.NET is using output caching at the server-side
 whereas this is request caching at the client-side) but maybe some of the
 code could be reused, especially around cache header parsing.

  A caching implementation would definitely have to take into account, at
 the minimum:

- Cacheability (public / private)
- Max age and expiry dates

 And revalidation using ETags and Last-Modified dates would be a
 nice-to-have (doing the request with the old ETag and Last-Modified date
 and getting a 304 Not Modified back if the page hasn't been modified) but
 isn't entirely necessary with a basic implementation (don't both
 revalidating, just clear the cache when the max age is met)

  I'd personally cache the results in memory using 
 System.Runtime.Cachinghttp://msdn.microsoft.com/en-us/library/system.runtime.caching.aspxrather
  than on disk, as on-disk caching can get slow. I haven't checked if
 Mono supports this, though.


 On Wed, Jun 5, 2013 at 11:32 AM, Mark Lintner mlint...@sinenomine.netwrote:

  Hi Greg,



 Great input. I have not gotten that far yet. Also the cache level is very
 naïve. Everything caches except Bypass cache which doesn't cache. To check
 the headers it would check the WebResponse Headers property coming
 into TryInsert in DirectoryBackedResponseCache.cs . I would combine the
 result of checking the header with the conditional ShouldCache which also
 needs work.  What we are looking for is comments like this, about what you
 think needs to be in a usable implementation, gotchas, things to look out
 for. Also if we are on the wrong track doing it this way I don't want to
 waste time doing something which will not be useful. Assuming I'm not on
 the wrong path, I will add the header check next. This is the kind of
 feedback we need. I only tried to make a prototype of how caching could
 work and then did some performance measurements. Obviously didn't add any
 of the details yet. If this is a viable approach I will continue to fill
 out the implementation guided by research and suggestions. Probably want to
 limit it to what we really

Re: [Mono-dev] Entity framework in mono

2013-06-09 Thread Daniel Lo Nigro
Entity Framework 4.3 is one of the release versions. You should be able to
add the proper reference in MonoDevelop if you browse directly to the
correct EntityFramework.dll file when adding the reference.


On Wed, Jun 5, 2013 at 5:07 PM, Sharique uddin Ahmed Farooqui 
saf...@gmail.com wrote:

 I created another project now using MD on Linux, added EntityFramwork.dll
 manually (don't know why add reference dialog not showing it), now It
 compile  successfully. On compilation it gives following warning.

 Warning CS1701: Assuming assembly reference `EntityFramework,
 Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' matches
 assembly `EntityFramework, Version=6.0.0.0, Culture=neutral,
 PublicKeyToken=b77a5c561934e089'. You may need to supply runtime policy
 (CS1701) (MonoMvc)

 I don't think there any EntityFramwork  with version 4.3.xx exists.

 Another thing is I'm not able to run it due to bug in
 System.Configuration  #11549 (
 https://bugzilla.xamarin.com/show_bug.cgi?id=11549)


 Sharique uddin Ahmed Farooqui
 http://safknw.blogspot.com/
 Peace is the Ultimate desire of mankind.


 On Tue, Jun 4, 2013 at 5:13 PM, Daniel Lo Nigro dan...@dan.cx wrote:


 Mono only supports Entity Framework 6 and support is currently not fully
 complete. I suggest looking at NHibernate or a micro ORM like ServiceStack
 ORMLite or Dapper instead.
 ---
 Regards,
 Daniel

 Sent from my phone - please excuse any typos.
 On 04/06/2013 3:40 PM, Sharique uddin Ahmed Farooqui saf...@gmail.com
 wrote:

 Hi,
 I build pretty basic application using entity framework5 and MVC3 using
 VS2012 Express, it works well.
 I open this application on Linux (OpenSuse 12.3, Mono 3.0.7). It gives
 error

 /home/sharique/Projects/my projects/dot
 net/MvcApplication1/MvcApplication1/Controllers/CustomerController.cs(44,44):
 Error CS0103: The name `EntityState' does not exist in the current context
 (CS0103) (MvcApplication1)

 --
 Sharique uddin Ahmed Farooqui
 http://safknw.blogspot.com/
 Peace is the Ultimate desire of mankind.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] mono WebResponse caching

2013-06-09 Thread Daniel Lo Nigro
There'd be some code for output caching in Mono's ASP.NET implementation, I
wonder if any of it could be reused here. They're different concepts (
ASP.NET is using output caching at the server-side whereas this is request
caching at the client-side) but maybe some of the code could be reused,
especially around cache header parsing.

A caching implementation would definitely have to take into account, at the
minimum:

   - Cacheability (public / private)
   - Max age and expiry dates

And revalidation using ETags and Last-Modified dates would be a
nice-to-have (doing the request with the old ETag and Last-Modified date
and getting a 304 Not Modified back if the page hasn't been modified) but
isn't entirely necessary with a basic implementation (don't both
revalidating, just clear the cache when the max age is met)

I'd personally cache the results in memory using
System.Runtime.Cachinghttp://msdn.microsoft.com/en-us/library/system.runtime.caching.aspxrather
than on disk, as on-disk caching can get slow. I haven't checked if
Mono supports this, though.


On Wed, Jun 5, 2013 at 11:32 AM, Mark Lintner mlint...@sinenomine.netwrote:

  Hi Greg,



 Great input. I have not gotten that far yet. Also the cache level is very
 naïve. Everything caches except Bypass cache which doesn't cache. To check
 the headers it would check the WebResponse Headers property coming
 into TryInsert in DirectoryBackedResponseCache.cs . I would combine the
 result of checking the header with the conditional ShouldCache which also
 needs work.  What we are looking for is comments like this, about what you
 think needs to be in a usable implementation, gotchas, things to look out
 for. Also if we are on the wrong track doing it this way I don't want to
 waste time doing something which will not be useful. Assuming I'm not on
 the wrong path, I will add the header check next. This is the kind of
 feedback we need. I only tried to make a prototype of how caching could
 work and then did some performance measurements. Obviously didn't add any
 of the details yet. If this is a viable approach I will continue to fill
 out the implementation guided by research and suggestions. Probably want to
 limit it to what we really need to have. Any other suggestions, comments,
 criticism would be greatly appreciated.



 Thanks,

 Mark
  --
 *From:* Greg Young [gregoryyou...@gmail.com]
 *Sent:* Tuesday, June 04, 2013 6:49 PM
 *To:* Mark Lintner
 *Cc:* mono-devel-list@lists.ximian.com
 *Subject:* Re: [Mono-dev] mono WebResponse caching

  I would expect this to look at http caching headers in response when
 caching such as expiration, whether something is cachable (public/private) etc
 but don't see any of that code (or maybe I missed it). Can you point to
 where it is in your implementation?

 On Tuesday, June 4, 2013, Mark Lintner wrote:

  We have noticed that parts of the Mono Web functionality are not yet
 implemented. We are hoping to be able to add some of these missing pieces.
 Caching of

 HttpWebResponses is the first one we took a look at. It would appear that
 Microsoft takes advantage of the internet explorer caching. Since it would
 appear

 that an HttpWebResponse is fully populated when it is returned from the
 cache and the only content in the urls that are cached are the bytes that
 come in on

 the wire, Microsoft must return things from the cache at a very low level
 and and let the response populate the normal way. This did not seem
 possible to

 emulate when I looked at mono. I also wanted to cache to a directory so
 that the urls can be inspected or deleted.


  After looking at the code for awhile I realized that I could save
 additional information from the response, ie: headercollection,
 cookiecontainer, Status

 code etc in the same file as the responsestream. A response can be
 serialized but not all of it, most importantly the responsestream is not
 serialized. I

 wrote a prototype with some helper functions, the only change to existing
 mono code would be in  HttpWebRequest.GetResponse. Before calling
 BeginGetResponse

 I call a function that tries to retrieve the url from the cache. If it is
 not there, BeginGetResponse is called as normal, the response is grabbed
 from

 EndGetResponse and passed to a method to insert into the cache. This
 insert method will open a filename in a directory designated as mono_cache
 with the name

 produced by calling HttpUtility.Encode so it is a legal filename. Also
 you can only read from the responsestream once, which means that if read
 from it, save

 it to a file, then the responsestream is no longer accessible from the
 WebResponse when it is returned to the calling code. If sream copy worked
 it could be

 used here. One way to fix the problem is to call GetResponseStream(),
 read it to the end, which produces a string, then finally convert the
 string to bytes.

 Then you can serialize the bytes to the open file, serialize the
 headercollection and 

Re: [Mono-dev] Entity framework in mono

2013-06-04 Thread Daniel Lo Nigro
Mono only supports Entity Framework 6 and support is currently not fully
complete. I suggest looking at NHibernate or a micro ORM like ServiceStack
ORMLite or Dapper instead.
---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 04/06/2013 3:40 PM, Sharique uddin Ahmed Farooqui saf...@gmail.com
wrote:

 Hi,
 I build pretty basic application using entity framework5 and MVC3 using
 VS2012 Express, it works well.
 I open this application on Linux (OpenSuse 12.3, Mono 3.0.7). It gives
 error

 /home/sharique/Projects/my projects/dot
 net/MvcApplication1/MvcApplication1/Controllers/CustomerController.cs(44,44):
 Error CS0103: The name `EntityState' does not exist in the current context
 (CS0103) (MvcApplication1)

 --
 Sharique uddin Ahmed Farooqui
 http://safknw.blogspot.com/
 Peace is the Ultimate desire of mankind.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Entity framework in mono

2013-06-04 Thread Daniel Lo Nigro
Mono only supports Entity Framework 6 and support is currently not fully
complete. I suggest looking at NHibernate or a micro ORM like ServiceStack
ORMLite or Dapper instead.

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 04/06/2013 3:40 PM, Sharique uddin Ahmed Farooqui saf...@gmail.com
wrote:

 Hi,
 I build pretty basic application using entity framework5 and MVC3 using
 VS2012 Express, it works well.
 I open this application on Linux (OpenSuse 12.3, Mono 3.0.7). It gives
 error

 /home/sharique/Projects/my projects/dot
 net/MvcApplication1/MvcApplication1/Controllers/CustomerController.cs(44,44):
 Error CS0103: The name `EntityState' does not exist in the current context
 (CS0103) (MvcApplication1)

 --
 Sharique uddin Ahmed Farooqui
 http://safknw.blogspot.com/
 Peace is the Ultimate desire of mankind.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] compile error (3.0.10) on my linux box.

2013-06-03 Thread Daniel Lo Nigro
No - The site is MediaWiki-powered (see
http://mono-project.com/Special:Version) so Xamarin could allow other
people to edit it if they wanted to.

On Mon, Jun 3, 2013 at 11:34 PM, Jeremy Bell bell.jer...@gmail.com wrote:

 Is the website itself on github? If not, I think this would be worthwhile.
 Then the community could submit pull requests to update the site - would
 free up the Xamarin devs to work on more useful things.


 On Fri, May 31, 2013 at 12:09 PM, eb65 e...@pipeline.com wrote:

 ...and, the libgdiplus-3.0.tar.bz2 package discussed in the v3 release
 notes
 for installation isn't available on the download page yet, and v3 is still
 listed as a beta version with v2.10 still listed as the latest stable
 version. C'mon guys, please update your website.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/compile-error-3-0-10-on-my-linux-box-tp4659534p4659831.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Parallel Mono Debs for 3.0.10 and Monodevelop 4.0.4 builds availible

2013-05-06 Thread Daniel Lo Nigro
Thanks Ian, nice work. Nice to see i386 packages as I think there was only
AMD64 last time I checked?

Have you packaged XSP?


On Mon, May 6, 2013 at 3:42 AM, Ian Norton inor...@gmail.com wrote:

 Hi all,

 I've finally gotten *both* the i386 and AMD64 builds ready again.

 I had hoped to use the new debian experimental builds to bootstrap it but
 had to resort to monolite for this version.

 More info here https://inorton.wordpress.com/

 Enjoy!

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] UTF8 encoding/decoding

2013-05-03 Thread Daniel Lo Nigro

 The problem with my tests is that they are written for comparing its
 output against the output of an existing reference runtime (in this moment
 ms-net).

You could probably save the output from MS.NET into a file and add that
file to the unit test project. Then your test would just need to get the
output from Mono and compare it to the expected output.


On Tue, Apr 30, 2013 at 7:03 AM, Gerardo García Peña killabyte...@gmail.com
 wrote:

 Hi Marek,

 I've discovered the directory /mono/mcs/class/corlib/Test/System.Text just
 now ... I never noticed it before, sorry.

 The problem with my tests is that they are written for comparing its
 output against the output of an existing reference runtime (in this moment
 ms-net). I will take a look to the existing UTF8EncodingTest.cs (and
 others), and I will try to add more test cases to cover the bugs that I
 reported and some other problems that I saw in the old implementation.

 As you can imagine I'm not very familiarized with the Mono sources, and I
 haven't found a mono tests' policy (how tests are integrated, best
 practices, etc), how the test mechanism is used (other description more
 specific for the mono case than than http://nunit.com/ web page), ... So
 any help like docs, links... will be useful :D

 As you requested I have made a pull request through github (#622). I hope
 you like it.

 Regards!
 Gerardo


 On Mon, Apr 29, 2013 at 6:48 PM, Marek Safar marek.sa...@gmail.comwrote:

 Hi Gerardo,

 This is very good Mono improvement. Could change your tests to fit mono
 nunit test style. It should not be too hard if you need guidance let me
 know or look how it's done for other mono parts.

 Secondly to make the review and merge easier for us could you send pull
 request with your changes.

 Thanks
 Marek

 I am Gerardo García Peña and I'm new in this list.

 Some months ago started working with mono in a project which demands a
 very precise manipulation of UTF8 (and other encodings) streams. When I
 started to write code I observed that the mono UTF8 implementation is very
 buggy, while the MS.NET implementation is quite good. Then I started to
 isolate the bugs and filled some bugs in the Ximian's bugzilla [1] [2].
 They're still there and unfixed, but I think they are important: an
 incompatibility in the text codec subsystems virtually affects any
 application that need portability between Microsoft and Mono platforms.
 Specially from the data integrity point of view, and in some cases
 availability security issues (indexes and counters reported by the
 conversion methods and throwed exceptions could make apps running on the
 Mono environment to enter into infinite loops, making apps running on the
 mono runtime vulnerable to DoS attacks).

 The bugs are still there (unresolved), and during this time I have found
 some more, so I decided to start patching the UTF8 libraries (and in the
 future, if this patch is accepted, I will continue working on other buggy
 codec that appears).

 The patch that I propose is an important modification of the file
 /mono/mcs/class/corlib/System.Text/UTF8Encoding.cs and some minor changes
 in other generic classes in System.Text. The targets of my patch are the
 following:

   - give a complete and good quality UTF8 coder  decoder implementation,
   - at least it is as much efficient as the old implementation,
   - better error handling and quick resync when bad sequences are found,
   - fix the index field in the Fallback exceptions (it is a key feature
 if one
 program want to handle strings with errors),
   - refactorize and make code more maintainable,
   - full compatibility with the .NET implementation (behaviour is
 exactly the
 same in front of bad and good sequences),
   - complete some pending or incomplete features (MonoTODO) like
 Encoder::FallbackException::IsUnknownSurrogate() or use of BOM
 preambles.

 Please note that in spite of presenting a full-compatible implementation
 of this codec with the Microsoft implementation, my changes are not based
 on Microsoft's work, and they are totally written from scratch. I have not
 reversed any code and the behaviour of my patches has been tunned using an
 extensive and exhaustive test case.

 My test case uses several public UTF8 test cases and one specific and
 giant UTF16 test case built automatically. The test case must be executed
 first on the Mono runtime environment and once again on the Microsoft
 runtime. The output of the test case are two directories (one for mono,
 another for net) documenting the output of (and exceptions thrown) the
 Convert() method. Once both executions are finished, it should not exist
 any difference between the
 two output directories.

 The test case is focused only on the Convert() method because it allows
 to test any variation of the input. My implementation (and probably
 Microsoft's too) is based on two coder/decoder functions that are called by
 all the other public methods. Because that reason 

Re: [Mono-dev] mono-devel and centos 6.3

2013-04-28 Thread Daniel Lo Nigro
You need to install MonoDevelop if you want an IDE.

Note that Mono 2.4 is VERY old now, I'd strongly suggest installing a newer
version.


On Sun, Apr 28, 2013 at 9:30 PM, Icadedt icad...@yahoo.fr wrote:

 hi,

 i have installed mono-devel 2.4.3.1-4.el6 in my centos 6.3 ,

 how to do to open the mono IDE ?

 Thanks in advance

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Recent Mono Source Releases

2013-04-19 Thread Daniel Lo Nigro
Yes, Github archives do not include Git submodules so the archives will be
incomplete.

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 18/04/2013 11:54 PM, APS dev.ma...@apsystems.it wrote:

 Unfortunately those archives seems to be incomplete.
 External libraries like ikvm are missing and you get e compilation error.
 I think you'll need to download  them separately.

 At 14:09 18/04/2013, Rafael Teixeira wrote:

 Hi Chris,

 There is a target to get monolite in the makefile.
 Also configure should always be rebuilt to be sure things match the
 platform you are building into (using autogen.sh), as per the
 'Building the software from GIT' part of the readme.

 Still someone from the core team, may help pointing out other options
 or new places to find things.

 Hope it helps,
 Rafael Teixeira
 O..:.)


 On Thu, Apr 18, 2013 at 8:49 AM, Chris Ball qha...@gmail.com wrote:
  Thanks, Rafael. Unfortunately, the release tars had some nice features
  (configure was pre-generated, and I believe that monolite was
  included) that helped simplify my build process. If these are no
  longer maintained, I'll have to update my build scripts, and I may
  lose the ability to bootstrap build.
 
  Before i go down this path, does anyone know if these are officially
 deprecated?
 
  //Q
 
  On 18.04.2013, at 13:24, Rafael Teixeira mono...@gmail.com wrote:
 
  I think that as GitHub already provides it on the tags page
  (https://github.com/mono/mono/**tagshttps://github.com/mono/mono/tags)
 it is not needed to do releases at
  http://download.mono-project.**com/sources/mono/http://download.mono-project.com/sources/mono/
 .
 
  tar.gz for 3.0.9 is at
  https://github.com/mono/mono/**archive/mono-3.0.9.tar.gzhttps://github.com/mono/mono/archive/mono-3.0.9.tar.gzfor
   example
 
  Hope it helps,
  Rafael Teixeira
  O..:.)
 
 
  On Thu, Apr 18, 2013 at 4:54 AM, Chris Ball qha...@gmail.com wrote:
  Looking at
 
  http://download.mono-project.**com/sources/mono/http://download.mono-project.com/sources/mono/
 
  I don't see any 3.0 source releases after 3.0.7. Are there plans to
 post
  future source releases here?
 
  //Q
 
  __**_
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.**com Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/**mailman/listinfo/mono-devel-**listhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 __**_
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.**com Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/**mailman/listinfo/mono-devel-**listhttp://lists.ximian.com/mailman/listinfo/mono-devel-list

 --
 Il messaggio e' stato analizzato alla ricerca di virus o
 contenuti pericolosi da MailScanner, ed e'
 risultato non infetto.


 __**_
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.**com Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/**mailman/listinfo/mono-devel-**listhttp://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Apply a patch or install unstable version? And which?

2013-04-19 Thread Daniel Lo Nigro

 I've answered to other question that as GitHub already provides it
 (compressed exports) on the tags page
 (https://github.com/mono/mono/tags) it is not needed to do (source)
 releases at
 http://download.mono-project.com/sources/mono/.;


Have you tried compiling these Github exports? I don't think they work as
expected, as they don't include submodules (so you need to download a bunch
of dependencies manually).


On Thu, Apr 18, 2013 at 9:45 PM, Rafael Teixeira mono...@gmail.com wrote:

 Hi APS,

 I've answered to other question that as GitHub already provides it
 (compressed exports) on the tags page
 (https://github.com/mono/mono/tags) it is not needed to do (source)
 releases at
 http://download.mono-project.com/sources/mono/.;

 From there you can see many tags (although some mis-versioning is present).

 Tags for the 3.0 series (which is installed with Xamarin Studio in
 MacOSX) are available. For example, the latest seems to be
 https://github.com/mono/mono/archive/mono-3.10.tar.gz that seems by
 its date to be the version following 3.0.9.

 As for stability, I guess that tagged versions should be considered
 reliable enough, but testing for what you need is the only way to be
 sure...

 Hope it helps,
 Rafael Teixeira
 O..:.)


 On Thu, Apr 18, 2013 at 7:39 AM, APS dev.ma...@apsystems.it wrote:
  You're right, the patch has not been applied yet. I've to apply the
 patch to
  my sources.
  Btw, how mono versions works?
  The last stable version, according to the website is 2.10.9, every other
  versions after that is supposed to be unstable, am I right?
  The last 2.1x version announced is 2.11.4. The 2.12 does not exists, it
 has
  been renamed to 3.0?
  In one of his blog posts Miguel says that the trunk is merged only with
  working changes, so it should be less unstable than older unstable
 versions.
  All these questions fall in the last one, for a production environment is
  safer to install 2.10.9, the last stable but without recent patches and,
  from today, with no more support or the 3.0.x, the beta version but fixed
  and checked?
  Sorry for these banal questions but I've to plan upgrades and I would
 like
  to do the correct thing.
 
 
  At 18:24 17/04/2013, Rafael Teixeira wrote:
 
  The bug is not 'Closed', so probably the patch wasn't reviewed and
  applied to sources, yet.
  Rafael Teixeira
  O..:.)
 
 
  On Wed, Apr 17, 2013 at 11:43 AM, APS dev.ma...@apsystems.it wrote:
   Hi,
   I have a doubt caused by my ignorance on how mono versions are
 released.
   I installed the latest stable release, 2.10.9 from sources and I fell
   into
   the bug described here
 https://bugzilla.xamarin.com/show_bug.cgi?id=3004
   I don't know if it's better for me to apply the patch to my code or to
   install a later version. I saw non-documented versions like 2.11.x,
 they
   are
   unstable? Abandoned? Why they are not listed between the versions
 under
   download page?
   Thanks in advance for yout help.
  
   ___
   Mono-devel-list mailing list
   Mono-devel-list@lists.ximian.com
   http://lists.ximian.com/mailman/listinfo/mono-devel-list
  
 
  --
  Il messaggio e' stato analizzato alla ricerca di virus o
  contenuti pericolosi da MailScanner, ed e'
  risultato non infetto.
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Recent Mono Source Releases

2013-04-18 Thread Daniel Lo Nigro
Yes, Github archives do not include Git submodules so the archives will be
incomplete.


On Thu, Apr 18, 2013 at 11:53 PM, APS dev.ma...@apsystems.it wrote:

 Unfortunately those archives seems to be incomplete.
 External libraries like ikvm are missing and you get e compilation error.
 I think you'll need to download  them separately.


 At 14:09 18/04/2013, Rafael Teixeira wrote:

 Hi Chris,

 There is a target to get monolite in the makefile.
 Also configure should always be rebuilt to be sure things match the
 platform you are building into (using autogen.sh), as per the
 'Building the software from GIT' part of the readme.

 Still someone from the core team, may help pointing out other options
 or new places to find things.

 Hope it helps,
 Rafael Teixeira
 O..:.)


 On Thu, Apr 18, 2013 at 8:49 AM, Chris Ball qha...@gmail.com wrote:
  Thanks, Rafael. Unfortunately, the release tars had some nice features
  (configure was pre-generated, and I believe that monolite was
  included) that helped simplify my build process. If these are no
  longer maintained, I'll have to update my build scripts, and I may
  lose the ability to bootstrap build.
 
  Before i go down this path, does anyone know if these are officially
 deprecated?
 
  //Q
 
  On 18.04.2013, at 13:24, Rafael Teixeira mono...@gmail.com wrote:
 
  I think that as GitHub already provides it on the tags page
  (https://github.com/mono/mono/**tagshttps://github.com/mono/mono/tags)
 it is not needed to do releases at
  http://download.mono-project.**com/sources/mono/http://download.mono-project.com/sources/mono/
 .
 
  tar.gz for 3.0.9 is at
  https://github.com/mono/mono/**archive/mono-3.0.9.tar.gzhttps://github.com/mono/mono/archive/mono-3.0.9.tar.gzfor
   example
 
  Hope it helps,
  Rafael Teixeira
  O..:.)
 
 
  On Thu, Apr 18, 2013 at 4:54 AM, Chris Ball qha...@gmail.com wrote:
  Looking at
 
  http://download.mono-project.**com/sources/mono/http://download.mono-project.com/sources/mono/
 
  I don't see any 3.0 source releases after 3.0.7. Are there plans to
 post
  future source releases here?
 
  //Q
 
  __**_
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.**com Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/**mailman/listinfo/mono-devel-**listhttp://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 __**_
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.**com Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/**mailman/listinfo/mono-devel-**listhttp://lists.ximian.com/mailman/listinfo/mono-devel-list

 --
 Il messaggio e' stato analizzato alla ricerca di virus o
 contenuti pericolosi da MailScanner, ed e'
 risultato non infetto.


 __**_
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.**com Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/**mailman/listinfo/mono-devel-**listhttp://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] ASP.NET Xarmin - GSoC 2013

2013-04-13 Thread Daniel Lo Nigro
Basic MVC 4 works fine in Mono, it's the tooling in MonoDevelop that needs
to be updated. Some of the optional features (like signing in using
Facebook/Twitter via OAuth) don't appear to work in Mono yet, but the core
MVC 4 framework works fine.


On Sun, Apr 14, 2013 at 8:48 AM, Message Box msgbox...@gmail.com wrote:

   look at kayak or nancy lately or the others like it?

 It's not so much that kayak or nancy are any worse than MVC3... it's more
 that MVC3 is used widely in third party apps, CMSes, etc that can't run on
 mono because of things missing in ASP.NET on mono
 Getting the framework running would at least be a step in the right
 direction and more people would start taking web app development on mono
 more seriously.



 On Sat, Apr 13, 2013 at 6:17 PM, Greg Young gregoryyou...@gmail.comwrote:

 ASP.NET has stagnated in Microsoft since the Novell era.

 I would try porting MVC3 but you don't really have to port it as its all
 managed

 look at kayak or nancy lately or the others like it?

 On Fri, Apr 12, 2013 at 6:10 PM, Message Box msgbox...@gmail.com wrote:
  ASP.NET support in Mono/MonoDevelop seems to have stagnated since the
 Novell
  era... creating a new MVC3 Razor project in MonoDevelop has never
 worked for
  me and I just installed the latest Xamarin Studio on a Mac and there
 was no
  option at all to build anything more recent that an MVC2 project.
  I and several others have logged bugs and issues relating to this over
 the
  last years but they've mostly just sat undiscovered.
 
  It would be absolutely awesome if we could develop modern .NET web apps
  using pure mono libraries on Mac/Linux in Xamarin Studio but it seems to
  need a lot of TLC.
 
  ASP.NET is losing a lot of ground generally in the web development
 world now
  because of the cost and availability of hosting and the fact most web
  developers seem to be rolling on a Mac these days. If we had support
 for the
  latest Microsoft web technologies in Mono/MonoDevelop I think that trend
  could be reversed and it would drive sales for Xamarin too (use the same
  database lookup code in your web app as you do on iOS, Android, WP8
 etc.).
 
  There are other MVC frameworks out there of course, but pretty much all
 the
  big third-party web applications use the MS frameworks.
  What would really rock is to be able to run things like Orchard,
 Umbraco,
  Kentico, etc on top of Mono.
 
 
 
 
 
  On Fri, Apr 12, 2013 at 6:28 AM, Sharique uddin Ahmed Farooqui
  saf...@gmail.com wrote:
 
 
 
  Sharique uddin Ahmed Farooqui
  http://safknw.blogspot.com/
  Peace is the Ultimate desire of mankind.
 
 
  On Thu, Apr 11, 2013 at 12:26 AM, Rauf Butt raufb...@gmail.com
 wrote:
 
  Dear Team Mono,
 
  I am a student based in UK. I read your ideas page and I am excited to
  contribute in open source community through the platform of GSoC 2013.
 
 
 
  I would like to enquire more about the project Make ASP.NET Awesome
 in
  Xamarin Studio so I can start reading and evaluating it for the
 proposal
  point of view. I understand that I would have to propose features for
 the
  project. Should I start by trying out Xarmin studio? Where can I
 download
  the latest build?
 
 
 
  Xamarin Studio is MonoDevelop + Xamarin addins, so u should be using MD
 
  I would be grateful if you could please comment or share some
 pointers to
  start working?
 
  Few ideas in my minds are
  Better debugging support for both asp.net webform and MVC
  Asp.net designer
  Make xsp as good as IIS express.
 
 
 
  Looking forward!
 
  Thanks,
 
  Rauf
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 



 --
 Le doute n'est pas une condition agréable, mais la certitude est absurde.



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] .Net Webservice

2013-02-20 Thread Daniel Lo Nigro
That's just the stack trace; we'd like the exception message and type as
well :)


On Thu, Feb 21, 2013 at 9:03 AM, Ghostdog m.schlemb...@ceeyafree.de wrote:

 Hi thanks for your fast reply.
 That is the StackTrace of the error I got.
 What information do you need.
 What I found out in the meantime that if the string I return is for example
 12345 everything works fine. As soon as I change the return value to
 123la or sth else I get this error.

 Thank you very much.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Net-Webservice-tp4658651p4658656.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-02-08 Thread Daniel Lo Nigro
The HttpResponse implementation in Mono is located here:
https://github.com/mono/mono/blob/master/mcs/class/System.Web/System.Web/HttpResponse.cs

I noticed this piece of code:

if (worker_request != null)
use_chunked = (worker_request.GetHttpVersion () == HTTP/1.1);


Which 
HttpResponseStreamhttps://github.com/mono/mono/blob/master/mcs/class/System.Web/System.Web/HttpResponseStream.csuses
to determine whether to chunk the response. Maybe you could try
hard-coding that variable to false and see if that fixes your problem?

If so, the fix is probably to disable response chunking when FastCGI is
being used (not just when the protocol is not HTTP/1.1).


On Fri, Feb 8, 2013 at 2:31 AM, SirNoSkill quandar...@hailmail.net wrote:

 **
 Hi,


 I've forwarded the error to the nginx mailing list.


 http://forum.nginx.org/read.php?2,235985,235988#msg-235988

 The response I got:
 It's bad idea to use Transfer-Encoding while working via CGI and
 derived protocols like FastCGI. Quote from RFC 3875,
 http://tools.ietf.org/html/rfc3875#section-6.3.4:

 The script MUST NOT return any header fields that relate to
 client-side communication issues and could affect the server's
 ability to send the response to the client.

 As you are talking to nginx via FastCGI, not HTTP, it won't try to
 dig into content returned and decode it according to any
 Transfer-Encoding. Instead, the Transfer-Encoding header
 returned will be just dropped by nginx as per RFC 3875.






 On Sat, Feb 2, 2013, at 09:00 PM, SirNoSkill wrote:

 I have more details on the bug.
 The extra bytes that are at the beginning

 31 39 36 62 36 38 0D 0A

 which reads 196b68/r/n in ASCII
 196b68 is the filesize of the original image in hex...

 All details + hexdump links added here:

 http://stackoverflow.com/questions/14662795/why-do-i-have-unwanted-extra-bytes-at-the-beginning-of-image



 All traffic to that URL [www.daniel-steiger.ch] (except for the folders
 /doc and /images), but including images in /Content, is directly forwarded
 to fastcgi by nginx, as per fastcgi config file for domain.


  server {
  listen   80;
  server_name www.daniel-steiger.ch daniel-steiger.ch;
  access_log   /var/log/nginx/daniel-steiger.ch.access.log;

  location / {
  root /home/danillo/www/HomePage;
  #index index.html index.htm default.aspx Default.aspx;
  #fastcgi_index Default.aspx;
  fastcgi_pass 127.0.0.1:9000;
  include /etc/nginx/fastcgi_params;
  }


 location /doc {
 root /usr/share;
 autoindex on;
 allow 127.0.0.1;
 deny all;
 }

 location /images {
 root /usr/share;
 autoindex off;
 }

 #error_page 404 /404.html;

 # redirect server error pages to the static page /50x.html
 #
 error_page 500 501 503 504 /50x.html;
 location = /50x.html {
 root /home/danillo/www/HomePage;
 }


 error_page 502 /502.html;
 location = /502.html {
 root /home/danillo/www/HomePage;
 }

 }


 It's sufficient to have the file served without FileResult.
 Of course it's more efficient if nginx serves it directly, but this is a
 very low traffic website, so performance is really not my problem ;)

 And by the way, the problem is not finding a workaround.
  I have already fixed it with a workaround about a week ago.
 I really just want to know where the bug is, because if FileResult
 malfunctions, there's probably more to it, and I don't want to walk into a
 subtle not at the first sight spottable bug later, like a botched binary
 upload/download file.





 On Sat, Feb 2, 2013, at 06:51 AM, Daniel Lo Nigro wrote:

 Hmm... Maybe try an X-Accel-Redirect header instead. This lets Nginx serve
 the file instead of Mono having to serve it, which makes it more efficient.
 See if that makes a difference, or if it has the same issue.

 Why not just link directly to the file, instead of serving it through your
 C# code?


 On Sun, Feb 3, 2013 at 1:43 AM, quandary82 quandar...@hailmail.netwrote:

 Corrected the mime, but seems to be a mono-bug (or fastcgi) anyway.

  More here:

 http://stackoverflow.com/questions/14662795/why-do-i-have-unwanted-extra-bytes-at-the-beginning-of-image



  --
  View this message in context:
 http://mono.1490590.n4.nabble.com/Bug-in-mono-3-0-1-MVC3-File-FileResult-tp4658382p4658422.html
  Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
  Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


 --
  SirNoSkill
  quandar...@hailmail.net

 -- http://www.fastmail.fm - mmm... Fastmail...


 --
  SirNoSkill
  quandar...@hailmail.net

 -- http://www.fastmail.fm - IMAP accessible web-mail


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Dictionary implementation + concurrency

2013-02-04 Thread Daniel Lo Nigro

 My guess the reason its not explicitly documented is that its only for types
 reference or smaller.

In this case it sounds like an unintentional implementation detail that
shouldn't be relied on?

You could probably look at the SSCLI and see if there's any comments around
it (but I think that if you look at that code, you will be unable to
contribute to Mono).


On Mon, Feb 4, 2013 at 9:46 PM, Greg Young gregoryyou...@gmail.com wrote:

 The .NET version does support it for types or reference size or smaller.

 My guess the reason its not explicitly documented is that its only for
 types reference or smaller.

 On Mon, Feb 4, 2013 at 12:40 PM, Alan alan.mcgov...@gmail.com wrote:
  Hey,
 
  As per the 'thread safety' section of the documentation, your code is
  invalid: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx. This
  kind of change will not make it safe to use the dictionary in a
  read/write way from multiple threads, especially not when you have
  multiple cores and multiple unshared caches for those CPU cores.
 
  Hashtable is documented to support multiple readers with at most 1
  writer. If you require those semantics, you should use a hashtable not
  a Dictionary. If you require a threadsafe dictionary class, you either
  need to roll your own or use ConcurrentDictionary. This is the only
  realistic way of having thread safe code.
 
  Alan
 
 
  On 4 February 2013 10:18, Rafael Teixeira mono...@gmail.com wrote:
  Yes, please.
 
  Rafael Monoman Teixeira
  ---
  The most exciting phrase to hear in science, the one that heralds new
  discoveries, is not 'Eureka!' (I found it!) but 'That's funny ...'
  Isaac Asimov
  US science fiction novelist  scholar (1920 - 1992)
 
 
  On Sun, Feb 3, 2013 at 5:15 PM, Greg Young gregoryyou...@gmail.com
 wrote:
 
  The .NET dictionary implementation is thread safe on reads/updates so
  long as the internal collection does not grow and size is of reference
  type or smaller. eg: if you set size to 1m items and had 100k with a
  fill factor that did not cause an internal growth it would be
  threadsafe. This assurance has been brought over from Hashtable (well
  documented) and is relatively not well documented but many take a
  dependency on it. The current mono implementation does not meet this
  assurance.
 
  int cur = table [(hashCode  int.MaxValue) %
  table.Length] - 1;
 
  // walk linked list until right slot is found
 or
  end is reached
  while (cur != NO_SLOT) {
  // The ordering is important for
  compatibility with MS and strange
  // Object.Equals () implementations
  if (linkSlots [cur].HashCode ==
 hashCode
   hcp.Equals (keySlots
  [cur], key)) {
  value = valueSlots [cur];
  return true;
  }
  cur = linkSlots [cur].Next;
  }
 
  seems fine when accessing. However when adding...
 
  // find an empty slot
  cur = emptySlot;
  if (cur == NO_SLOT)
  cur = touchedSlots++;
  else
  emptySlot = linkSlots [cur].Next;
 
  // store the hash code of the added item,
  // prepend the added item to its linked list,
  // update the hash table
  linkSlots [cur].HashCode = hashCode;
  linkSlots [cur].Next = table [index] - 1;
  table [index] = cur + 1;
 
  // store item's data
  keySlots [cur] = key;
  valueSlots [cur] = value;
 
  Can cause null reads of a key as its in linkSlots but the value slot
  has not yet been updated. Setting keySlots after valueSlots would seem
  to solve this. Pull request wanted?
 
  Cheers,
 
  Greg
 
  --
  Le doute n'est pas une condition agréable, mais la certitude est
 absurde.
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 



 --
 Le doute n'est pas une condition agréable, mais la certitude est absurde.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com

Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-02-03 Thread Daniel Lo Nigro
That does look like a bug with how Mono handles TransmitFile - I suggest
reporting it as a bug in Xamarin Bugzilla (report it under the System.Web
component).

Also FYI it's probably best if you pull down those pages for now; you're
not validating the myfile parameter so it's open to a Remote File
Inclusion http://en.wikipedia.org/wiki/Remote_file_inclusionvulnerability.


On Sun, Feb 3, 2013 at 9:38 PM, quandary quandar...@hailmail.net wrote:

  Yep, indeed that sounds like that.
 And I just tested.
 Added WriteFile.ashx and Transmit.ashx

 and testet with
 http://www.daniel-steiger.ch/WriteFile.ashx
 http://www.daniel-steiger.ch/Transmit.ashx
 and
 http://www.daniel-steiger.ch/WriteFile.ashx?myfile=avatar100.png
 http://www.daniel-steiger.ch/Transmit.ashx?myfile=avatar100.png


 It seems the bug is in Response.TransmitFile for files of any size
 (also for avatar100.png, which is only 4.3 kb)

 so to summarize, there is a rather bad-natured bug in
 Class: System.Web.HttpResponse
 Method: TransmitFile(string filename)


 This is the transmit-handler code:

 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;

 namespace Homepage
 {
 /// summary
 /// Zusammenfassungsbeschreibung für Transmit
 /// /summary
 public class Transmit : IHttpHandler
 {

 public void ProcessRequest(HttpContext context)
 {
 string strFile = context.Request.Params[myfile];

 if (string.IsNullOrEmpty(strFile))
 strFile = 001.jpg;

 string strNetPath =
 string.Format(~/Content/images/gallery/{0}, strFile);
 string strFileNameAndPath =
 context.Server.MapPath(strNetPath);

 context.Response.Clear();
 context.Response.ContentType = image/jpeg;
 context.Response.TransmitFile(strFileNameAndPath);
 }

 public bool IsReusable
 {
 get
 {
 return false;
 }
 }
 }

 }



 Regards

 Stefan





 On 02/03/2013 06:14 AM, Daniel Lo Nigro wrote:

 That sounds like chunked encoding, Wikipedia says (
 http://en.wikipedia.org/wiki/Chunked_transfer_encoding):
 *Each chunk starts with the number of octets of the data it embeds
 expressed in hexadecimal followed by optional parameters (chunk
 extension) and a terminating CRLF sequence, followed by the chunk data.
 The chunk is terminated by CRLF. If chunk extensions are provided, the
 chunk size is terminated by a semicolon followed with the extension name
 and an optional equal sign and value.*

  Which is exactly what you're saying. I wonder if something is not being
 done correctly with files as large as the ones you're using. Since you said
 it works for thumbnails, I assume it's working for smaller files.

  Try Response.WriteFile or Response.TransmitFile in a standard ASP.NEThandler 
 (.ashx) and see if they also don't work.

  All traffic to that URL [www.daniel-steiger.ch] (except for the folders
 /doc and /images), but including images in /Content, is directly forwarded
 to fastcgi by nginx, as per fastcgi config file for domain.

 I'd still suggest letting Nginx serve your static files. Just because the
 site is low-traffic doesn't mean that little performance tweaks aren't good
 :). I do something like this:
  location / {
  # Pass requests for unknown files to Mono
  try_files $uri @mono;
 }

  location @mono {
  # Put all your Mono config here
 }
 My full site config is at
 https://github.com/Daniel15/Website/blob/master/nginx.conf



 On Sun, Feb 3, 2013 at 4:00 PM, SirNoSkill quandar...@hailmail.netwrote:

  I have more details on the bug.
  The extra bytes that are at the beginning

 31 39 36 62 36 38 0D 0A

 which reads 196b68/r/n in ASCII
  196b68 is the filesize of the original image in hex...

 All details + hexdump links added here:

 http://stackoverflow.com/questions/14662795/why-do-i-have-unwanted-extra-bytes-at-the-beginning-of-image



 All traffic to that URL [www.daniel-steiger.ch] (except for the folders
 /doc and /images), but including images in /Content, is directly forwarded
 to fastcgi by nginx, as per fastcgi config file for domain.


  server {
   listen   80;
   server_name www.daniel-steiger.ch daniel-steiger.ch;
   access_log   /var/log/nginx/daniel-steiger.ch.access.log;

  location / {
   root /home/danillo/www/HomePage;
   #index index.html index.htm default.aspx Default.aspx;
   #fastcgi_index Default.aspx;
   fastcgi_pass 127.0.0.1:9000;
   include /etc/nginx/fastcgi_params;
   }


 location /doc {
  root /usr/share;
  autoindex on;
  allow 127.0.0.1;
  deny all;
  }

 location /images {
  root /usr/share;
  autoindex off;
  }

 #error_page 404 /404.html;

 # redirect server error pages to the static page /50x.html
  #
  error_page 500 501 503 504 /50x.html;
  location = /50x.html {
  root

Re: [Mono-dev] Random Internal Compiler Error with extension methods on interfaces?

2013-02-03 Thread Daniel Lo Nigro
I tried comparing Mono 2.10.8 to 3.0.2 in Github but there's 6,566 commits
between them so it's hard to tell exactly which one fixed it :)

If you have time to, you could try a few different Mono versions and narrow
it down to a release that fixes it. I'd try the last release of 2.10, the
first and last (2.11.4) releases of 2.11, and the first release of 3.0. It
was probably fixed between 2.10 - 2.11 or 2.11 - 3.0.


On Sun, Feb 3, 2013 at 2:10 PM, Jordan Earls ea...@lastyearswishes.comwrote:

 Awesome.. Is there any reports of bugs that could've caused this? I'd
 really like to workaround this issue for compatibility reasons with
 older versions of mono

 On Sat, Feb 2, 2013 at 9:46 PM, Andres G. Aragoneses kno...@gmail.com
 wrote:
  On 03/02/13 02:37, Jordan Earls wrote:
 
  If anyone wants to see the bug in action, extract
  http://earlz.net/static/repro.tgz
 
 
  I just tested compiling with Mono 3.0.2 and there is no compiler error,
 so
  the bug is fixed in this version.
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-02-03 Thread Daniel Lo Nigro
Better I mention it than risking someone more malicious noticing it, since
the link was already in a public mailing list. :)

Isn't this a mono-bug, too ?

As far as I'm aware, the .NET Framework only validates for HTML tags in
parameters. It doesn't validate file paths since it doesn't even know the
parameter will be used for a file path (things like ..\ could be valid
GET parameters for your page). I don't think there's any built in mechanism
to prevent directory traversal.

.NET request validation:
http://msdn.microsoft.com/en-us/library/hh882339.aspx


On Sun, Feb 3, 2013 at 10:34 PM, quandary quandar...@hailmail.net wrote:

  Oh wonderful, it's called remote file inclusion.
 I suspected that much, but I didn't bother to address it,
 because I didn't publish the sources and internal config files - up until
 today.

 So with you having mentioned it for all script kiddies to see - site taken
 down until validation is added.
 Before that, I quickly checked - one can access files below the root
 directory of the web application.

 Isn't this a mono-bug, too ?
 Because I think I remember me having done this once on a test or
 production server, and it gave a wonderful YSOD on IIS.






 On 02/03/2013 11:45 AM, Daniel Lo Nigro wrote:

 That does look like a bug with how Mono handles TransmitFile - I suggest
 reporting it as a bug in Xamarin Bugzilla (report it under the System.Web
 component).

  Also FYI it's probably best if you pull down those pages for now; you're
 not validating the myfile parameter so it's open to a Remote File
 Inclusion http://en.wikipedia.org/wiki/Remote_file_inclusionvulnerability.


 On Sun, Feb 3, 2013 at 9:38 PM, quandary quandar...@hailmail.net wrote:

  Yep, indeed that sounds like that.
 And I just tested.
 Added WriteFile.ashx and Transmit.ashx

 and testet with
 http://www.daniel-steiger.ch/WriteFile.ashx
 http://www.daniel-steiger.ch/Transmit.ashx
 and
 http://www.daniel-steiger.ch/WriteFile.ashx?myfile=avatar100.png
 http://www.daniel-steiger.ch/Transmit.ashx?myfile=avatar100.png


 It seems the bug is in Response.TransmitFile for files of any size
 (also for avatar100.png, which is only 4.3 kb)

 so to summarize, there is a rather bad-natured bug in
 Class: System.Web.HttpResponse
 Method: TransmitFile(string filename)


 This is the transmit-handler code:

 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Web;

 namespace Homepage
 {
 /// summary
 /// Zusammenfassungsbeschreibung für Transmit
 /// /summary
 public class Transmit : IHttpHandler
 {

 public void ProcessRequest(HttpContext context)
 {
 string strFile = context.Request.Params[myfile];

 if (string.IsNullOrEmpty(strFile))
 strFile = 001.jpg;

 string strNetPath =
 string.Format(~/Content/images/gallery/{0}, strFile);
 string strFileNameAndPath =
 context.Server.MapPath(strNetPath);

 context.Response.Clear();
 context.Response.ContentType = image/jpeg;
 context.Response.TransmitFile(strFileNameAndPath);
 }

 public bool IsReusable
 {
 get
 {
 return false;
 }
 }
 }

 }



 Regards

 Stefan





 On 02/03/2013 06:14 AM, Daniel Lo Nigro wrote:

 That sounds like chunked encoding, Wikipedia says (
 http://en.wikipedia.org/wiki/Chunked_transfer_encoding):
 *Each chunk starts with the number of octets of the data it embeds
 expressed in hexadecimal followed by optional parameters (chunk
 extension) and a terminating CRLF sequence, followed by the chunk data.
 The chunk is terminated by CRLF. If chunk extensions are provided, the
 chunk size is terminated by a semicolon followed with the extension name
 and an optional equal sign and value.*

  Which is exactly what you're saying. I wonder if something is not being
 done correctly with files as large as the ones you're using. Since you said
 it works for thumbnails, I assume it's working for smaller files.

  Try Response.WriteFile or Response.TransmitFile in a standard 
 ASP.NEThandler (.ashx) and see if they also don't work.

  All traffic to that URL [www.daniel-steiger.ch] (except for the folders
 /doc and /images), but including images in /Content, is directly forwarded
 to fastcgi by nginx, as per fastcgi config file for domain.

 I'd still suggest letting Nginx serve your static files. Just because the
 site is low-traffic doesn't mean that little performance tweaks aren't good
 :). I do something like this:
  location / {
  # Pass requests for unknown files to Mono
  try_files $uri @mono;
 }

  location @mono {
  # Put all your Mono config here
 }
 My full site config is at
 https://github.com/Daniel15/Website/blob/master/nginx.conf



 On Sun, Feb 3, 2013 at 4:00 PM, SirNoSkill quandar...@hailmail.netwrote:

  I have more details on the bug.
  The extra bytes that are at the beginning

 31 39 36 62

Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-02-03 Thread Daniel Lo Nigro

 RFI can't work in MVC

Yeah, routing rules should block it, I forgot to mention that. I don't
think ASP.NET MVC allows \ in its route parameters.

But if you have the default route (/ControllerName/ActionName) enabled,
your app could still be vulnerable. A user could pass the parameter as a
GET or POST parameter (ie. go to
/Gallery/FullImage?id=../../../../../../../etc/passwd)
and the default model binder will accept this parameter. It's usually safer
to always do validation of your parameters instead of relying on the
routing engine to do it :)

What I mean is file path validation in
 Response.TransmitFile
 Response.WriteFile
 Server.MapPath
 System.IO.Path.GetFiles
 etc.
 To check whether the requested file is not below the root directory of the
 web application

But in some cases you might want to read files below the root directory
(eg. some apps use c:\Windows\Temp or /tmp)

WriteFile.ashx?myfile=../../../../../../../root/.ssh/id_rsa would be really
 really bad.

This should never work as id_rsa should have its mode set to 0700 and Mono
shouldn't be running as root. The user Mono runs as should be relatively
locked down. I use www-data (the default web server / PHP-FPM user in
Debian) for mine.


On Mon, Feb 4, 2013 at 12:03 AM, quandary quandar...@hailmail.net wrote:

  Remote file inclusion fixed, ashx handlers removed, FullImage removed,
 website back up.

 Filed but 10'001
 https://bugzilla.xamarin.com/show_bug.cgi?id=10001



 No, I don't mean parameter validation, and RFI can't work in MVC when you
 request from a browser on Windows, because
 parameters are separated by / and windows translates backslash to
 forwardslash.
 (at least not until one uses a catchall parameter), I checked.

 If you'd use a browser on Linux, I don't know if it would change
 backslashes into slashes,
 which would be a potentially dangerous thing for a windows server.
 But I have a Linux server, so who cares about that.

 It can only work for parameters passed via QueryString/HttpPost, such as
 in the two ashx handlers I added.
 (or if a confidential file is in the same directory, but that would be
 really stupid).


 What I mean is file path validation in
 Response.TransmitFile
 Response.WriteFile
 Server.MapPath
 System.IO.Path.GetFiles
 etc.
 To check whether the requested file is not below the root directory of the
 web application
 (so that it would throw an AccessDeniedException on TransmitFile).

 Or in other words,
 if( !strFileName.StartsWith(AppDomain.CurrentDomain.BaseDirectory,
 StringComparer.OrdinalIgnoreCase)
  throw new AccessDeniedException(no access to files below application
 root directory);

 of course, the above is not sufficient, because relative paths in absolute
 paths are possible and supported by .NET/Windows/Linux.

 Because if that path validation isn't done, one can request (for example
 in my previous handler)
 wget
 http://www.daniel-steiger.ch/WriteFile.ashx?myfile=../../../../../../../etc/passwd
 which makes RFI interesting in the first place.
 I checked an it worked, I got /etc/passwd back...
 Now /etc/passwd wouldn't be that bad,
 since it only contains MD5 hashes (though MD5 is rainbow-table vulnerable)
 and because I configured ssh to not allow password logins,
 but WriteFile.ashx?myfile=../../../../../../../root/.ssh/id_rsa would be
 really really bad.

 I think I remember stumbling over such an exception somehow in IIS
 (perhaps SecurityException and not AccessDenied),
 but not on the ASP.NET development server.






 On 02/03/2013 12:41 PM, Daniel Lo Nigro wrote:

 Better I mention it than risking someone more malicious noticing it, since
 the link was already in a public mailing list. :)

  Isn't this a mono-bug, too ?

 As far as I'm aware, the .NET Framework only validates for HTML tags in
 parameters. It doesn't validate file paths since it doesn't even know the
 parameter will be used for a file path (things like ..\ could be valid
 GET parameters for your page). I don't think there's any built in mechanism
 to prevent directory traversal.

  .NET request validation:
 http://msdn.microsoft.com/en-us/library/hh882339.aspx


 On Sun, Feb 3, 2013 at 10:34 PM, quandary quandar...@hailmail.net wrote:

  Oh wonderful, it's called remote file inclusion.
 I suspected that much, but I didn't bother to address it,
 because I didn't publish the sources and internal config files - up until
 today.

 So with you having mentioned it for all script kiddies to see - site
 taken down until validation is added.
 Before that, I quickly checked - one can access files below the root
 directory of the web application.

 Isn't this a mono-bug, too ?
 Because I think I remember me having done this once on a test or
 production server, and it gave a wonderful YSOD on IIS.






 On 02/03/2013 11:45 AM, Daniel Lo Nigro wrote:

 That does look like a bug with how Mono handles TransmitFile - I suggest
 reporting it as a bug in Xamarin Bugzilla (report it under the System.Web
 component

Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-02-02 Thread Daniel Lo Nigro
Hmm... Maybe try an X-Accel-Redirect header instead. This lets Nginx serve
the file instead of Mono having to serve it, which makes it more efficient.
See if that makes a difference, or if it has the same issue.

Why not just link directly to the file, instead of serving it through your
C# code?


On Sun, Feb 3, 2013 at 1:43 AM, quandary82 quandar...@hailmail.net wrote:

 Corrected the mime, but seems to be a mono-bug (or fastcgi) anyway.

 More here:

 http://stackoverflow.com/questions/14662795/why-do-i-have-unwanted-extra-bytes-at-the-beginning-of-image



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Bug-in-mono-3-0-1-MVC3-File-FileResult-tp4658382p4658422.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-02-02 Thread Daniel Lo Nigro
That sounds like chunked encoding, Wikipedia says (
http://en.wikipedia.org/wiki/Chunked_transfer_encoding):
*Each chunk starts with the number of octets of the data it embeds
expressed in hexadecimal followed by optional parameters (chunk extension)
and a terminating CRLF sequence, followed by the chunk data. The chunk is
terminated by CRLF. If chunk extensions are provided, the chunk size is
terminated by a semicolon followed with the extension name and an optional
equal sign and value.*

Which is exactly what you're saying. I wonder if something is not being
done correctly with files as large as the ones you're using. Since you said
it works for thumbnails, I assume it's working for smaller files.

Try Response.WriteFile or Response.TransmitFile in a standard
ASP.NEThandler (.ashx) and see if they also don't work.

All traffic to that URL [www.daniel-steiger.ch] (except for the folders
 /doc and /images), but including images in /Content, is directly forwarded
 to fastcgi by nginx, as per fastcgi config file for domain.

I'd still suggest letting Nginx serve your static files. Just because the
site is low-traffic doesn't mean that little performance tweaks aren't good
:). I do something like this:
location / {
# Pass requests for unknown files to Mono
try_files $uri @mono;
}

location @mono {
# Put all your Mono config here
}
My full site config is at
https://github.com/Daniel15/Website/blob/master/nginx.conf



On Sun, Feb 3, 2013 at 4:00 PM, SirNoSkill quandar...@hailmail.net wrote:

 **
 I have more details on the bug.
 The extra bytes that are at the beginning

 31 39 36 62 36 38 0D 0A

 which reads 196b68/r/n in ASCII
 196b68 is the filesize of the original image in hex...

 All details + hexdump links added here:

 http://stackoverflow.com/questions/14662795/why-do-i-have-unwanted-extra-bytes-at-the-beginning-of-image



 All traffic to that URL [www.daniel-steiger.ch] (except for the folders
 /doc and /images), but including images in /Content, is directly forwarded
 to fastcgi by nginx, as per fastcgi config file for domain.


  server {
  listen   80;
  server_name www.daniel-steiger.ch daniel-steiger.ch;
  access_log   /var/log/nginx/daniel-steiger.ch.access.log;

  location / {
  root /home/danillo/www/HomePage;
  #index index.html index.htm default.aspx Default.aspx;
  #fastcgi_index Default.aspx;
  fastcgi_pass 127.0.0.1:9000;
  include /etc/nginx/fastcgi_params;
  }


 location /doc {
 root /usr/share;
 autoindex on;
 allow 127.0.0.1;
 deny all;
 }

 location /images {
 root /usr/share;
 autoindex off;
 }

 #error_page 404 /404.html;

 # redirect server error pages to the static page /50x.html
 #
 error_page 500 501 503 504 /50x.html;
 location = /50x.html {
 root /home/danillo/www/HomePage;
 }


 error_page 502 /502.html;
 location = /502.html {
 root /home/danillo/www/HomePage;
 }

 }


 It's sufficient to have the file served without FileResult.
 Of course it's more efficient if nginx serves it directly, but this is a
 very low traffic website, so performance is really not my problem ;)

 And by the way, the problem is not finding a workaround.
  I have already fixed it with a workaround about a week ago.
 I really just want to know where the bug is, because if FileResult
 malfunctions, there's probably more to it, and I don't want to walk into a
 subtle not at the first sight spottable bug later, like a botched binary
 upload/download file.





 On Sat, Feb 2, 2013, at 06:51 AM, Daniel Lo Nigro wrote:

 Hmm... Maybe try an X-Accel-Redirect header instead. This lets Nginx serve
 the file instead of Mono having to serve it, which makes it more efficient.
 See if that makes a difference, or if it has the same issue.

 Why not just link directly to the file, instead of serving it through your
 C# code?


 On Sun, Feb 3, 2013 at 1:43 AM, quandary82 quandar...@hailmail.netwrote:

 Corrected the mime, but seems to be a mono-bug (or fastcgi) anyway.

  More here:

 http://stackoverflow.com/questions/14662795/why-do-i-have-unwanted-extra-bytes-at-the-beginning-of-image



  --
  View this message in context:
 http://mono.1490590.n4.nabble.com/Bug-in-mono-3-0-1-MVC3-File-FileResult-tp4658382p4658422.html
  Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
  Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


 --
  SirNoSkill
  quandar...@hailmail.net

 -- http://www.fastmail.fm - mmm... Fastmail...


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bug in mono 3.0.1 MVC3 File/FileResult

2013-01-31 Thread Daniel Lo Nigro
Not a bug in Mono, you're just sending the wrong mime-type (and the browser
isn't recognising that it's an image). image/jpg should actually be
image/jpeg.

I noticed you're using Nginx, I'd probably use a custom ActionResult that
uses the X-Accel-Redirect header http://wiki.nginx.org/XSendfile for
better performance. This lets Nginx serve the file based on a HTTP header
your code returns.


On Wed, Jan 30, 2013 at 2:59 AM, SirNoSkill quandar...@hailmail.net wrote:


 There is a bug in mono 3.0.1.
 I don't know if it is fixed in 3.0.3


 If in a asp.net MVC3 controller, I call File via path (probably uses
 FilePathResult)
 like this

 http://www.daniel-steiger.ch/gallery/FullImage/001.jpg?no_cache=1358694795000

 I get the image data as text.
 The path is correct.
 The mime is correct.
 The image itselfs is valid.

 If I call the url to the image directly and not via the File method,
 then it works
 Proof:

 http://www.daniel-steiger.ch/Content/images/gallery/002.jpg?LastWriteTimeUTC=1358694795000

 Ironically, generating the thumbnail works (that probably goes via
 FileStreamResult).
 Both work correctly on windows.


 PS:
 The latest-stable install script for xsp misses copying
 fastcgi-mono-server4, mod-mono and xsp  to the 4.5 gac.
 Same things applies to Microsoft.VisualBasic.dll.
 See here:

 http://stackoverflow.com/questions/4239645/does-the-razor-view-engine-work-for-mono




 namespace Homepage.Controllers
 {


 public class GalleryController : Controller
 {


 protected static string GetImageDirectory()
 {
 string bd = AppDomain.CurrentDomain.BaseDirectory;
 string strImageDirectory = System.IO.Path.Combine(bd,
 Content);
 strImageDirectory =
 System.IO.Path.Combine(strImageDirectory, images);
 strImageDirectory =
 System.IO.Path.Combine(strImageDirectory, gallery);

 return strImageDirectory;
 } // End Function GetImageDirectory


 protected static string strImageDirectory = GetImageDirectory();


 public FileResult FullImage(string id)
 {
 string strFileName =
 System.IO.Path.Combine(strImageDirectory, id);

 //return new FilePathResult(CorrectFullPathAndFileName,
 CorrectMime);
 return File(strFileName, image/jpg);
 } // End Action FullImage



 public FileResult Thumb(string id)
 {
 //return Redirect(id);

 string strFileName =
 System.IO.Path.Combine(strImageDirectory, id);

 System.IO.Stream ms =
 Tools.Imaging.GetThumbnailStream(strFileName,
 System.Drawing.Imaging.ImageFormat.Png);
 return File(ms, image/png);
 /*
 using (System.IO.Stream ms =
 Tools.Imaging.GetThumbnailStream(strFileName,
 System.Drawing.Imaging.ImageFormat.Png))
 {
 return File(ms, image/png);
 }*/
 } // End Action Thumb


 } // End Class GalleryController : Controller


 } // End Namespace Homepage.Controllers



 --
   SirNoSkill
   quandar...@hailmail.net

 --
 http://www.fastmail.fm - Email service worth paying for. Try it for free

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Building Mono on OSX from GitHub

2013-01-31 Thread Daniel Lo Nigro
Try ./autogen.sh instead of ./configure.


On Fri, Feb 1, 2013 at 8:10 AM, shmuelie shmueli.yo...@englard.net wrote:

 I need the latest commit of Mono (

 https://github.com/mono/mono/commit/1c47612b58f7830131d8acc85089e71a73291e5a
 
 https://github.com/mono/mono/commit/1c47612b58f7830131d8acc85089e71a73291e5a
 
 ) to run my applications. To do this I need to build it from the GitHub
 code
 yet all my attempts at doing what
 http://www.mono-project.com/Compiling_Mono_on_OSX
 http://www.mono-project.com/Compiling_Mono_on_OSX   says I should do
 fail.
 I get the error:
 ./configure: No such file or directory



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Building-Mono-on-OSX-from-GitHub-tp4658394.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Building Mono on OSX from GitHub

2013-01-31 Thread Daniel Lo Nigro
I've never used Mac OSX before - Does /usr/local/ exist? You might have to
use a different prefix (when you run ./configure or ./autogen.sh), it's the
--prefix option. Something like ./configure --prefix=/opt/mono/ where the
prefix path is wherever you want to install Mono to.


On Fri, Feb 1, 2013 at 10:18 AM, shmuelie shmueli.yo...@englard.net wrote:

 I thought I had but you gave me the idea to double check and I didn't!
 Installed them and tried to configure autoconfig and it worked! make
 worked too but sadly make install failed with:

 test -z /usr/local/bin || ../build-aux/install-sh -c -d /usr/local/bin
 mkdir: /usr/local: Permission denied
 mkdir: /usr/local: No such file or directory



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Building-Mono-on-OSX-from-GitHub-tp4658394p4658400.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Question on SerialPort - Serial.c

2013-01-13 Thread Daniel Lo Nigro

 What would be the best way to offer this version to my users so they get
 and install the 2.11.4.xxx?

Generally these would be distributed as patch files. People would download
the Mono source from the Mono site, then apply your patch, and then compile
it. Having said that...

Just for reference, the standard Windows SerialPort driver accepts
 500,000bauds, so probably Mono should do as well.

Any difference between Microsoft's .NET implementation and Mono is
considered a bug in Mono. If Mono doesn't support it but Microsoft's does,
you should submit it to Mono's official code base. Create a bug in
Xamarin's Bugzilla, and then send a pull request on Github referencing the
bug number. Does Microsoft's implementation accept *any* baud rate, or are
there only some that it accepts that Mono doesn't? If Microsoft's accepts
any then maybe the baud rate validation should be moved from Mono.

Another (albeit generic) question is from a build perspective. When I
 update the Serial.c and do a make, I need to do a make install for the
 library to be installed. All that is very time consuming, is there any
 recommended way to update on the serial library update on the system only,
 rather than having to make and install everything again and again with
 every change?

You should be able to run make and make install in the directory of the
file you're modifying, and that should compile and install just that
component.



On Mon, Jan 14, 2013 at 5:21 AM, fo...@arocholl.com wrote:

 **

 Hi,

 My first post here. Let me introduce myself: I am a 25+ experienced
 C/C++/C# DOS/Windows developer so more than willing to help on this
 outstanding project with my 2 cents. Some experience on Linux and getting
 some in Mac OS as well, but my real skills are on Windows. Please forgive
 me by asking perhaps something obvious to an experienced Linux developer, I
 am happy to be pointed to a specific How-to or whatever knowledge base
 that can describe my question. As a long time user of distribution lists, I
 always do my homework before posting a question.

 I have been using Mono for some time, but never had the need or time to do
 changes to the foundation myself.

 I am using Mono 2.11.4 on Ubuntu 12.04, that is my setup for questions
 below. My serial device is a Silabs USB-COM driver CP2102.

 My specific question is about SerialPort class as well as some basic
 rules about how to deal with custom changes:

 ·   I found SerialPort class rejects a custom baudrate I need
 (500,000 bauds – 500Kbaud). Looking into the source code I found the
 limitation to be in Serial.c file, so I added the B50 and works fine.
 So I have now a 2.11.4. that is my specific version that resolves a
 problem I have. What would be the best way to offer this version to my
 users so they get and install the 2.11.4.xxx? My first thought was to
 deliver a .tar source code file structure as the official website does, so
 every user compiles and install this updated version. On the other hand, it
 would be easier for users to get the baseline 2.11.4 and update the
 specific library only. I am not sure either if distributing my own source
 code file structure is against any of the Mono development recommendations.
 Any general suggestion on how to distribute these changes so they are
 available to users of my software are welcome.

 ·   Should I submit this fix/enhancement to the GIT source code base
 or is this kind of too custom for baseline branch? Just for reference, the
 standard Windows SerialPort driver accepts 500,000bauds, so probably Mono 
 should
 do as well. Furthermore, the underlying Linux serial COM driver has no
 problem with this custom baudrate as long as the device supports it.

 ·   Another (albeit generic) question is from a build perspective.
 When I update the Serial.c and do a make, I need to do a make install
 for the library to be installed. All that is very time consuming, is there
 any recommended way to update on the serial library update on the system
 only, rather than having to make and install everything again and again
 with every change? I am probably missing something obvious…

 ·   A second problem I have on SerialPort class is apparently the
 timeout parameter is not being honored. The SerialPort class changes the
 timeout to the value I set, but the underlying Linux driver shows dmesg
 with no changes in timeout. For instance if I set timeout=5000 for a 5sec
 timeout, the software goes back immediately (as it apparently uses the
 100ms default) rather than waiting up to 5sec to get back with a timeout
 error. So my question is if this is a known limitation and anyone has a fix
 I could use. I saw nothing on the archive devel list nor the bugzilla. Any
 help appreciated.

 Best regards,

 Ariel Rocholl



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



Re: [Mono-dev] Question on SerialPort - Serial.c

2013-01-13 Thread Daniel Lo Nigro

  So except anyone disagree, baudrate values should not be checked for
 anything different than that.

I agree - Mono should do whatever Microsoft .NET does.

In general terms, how often a new Mono version is released with all the
 accumulated fixes?

Releases of Mono 3.0 are coming out more frequently than previous releases
did. Mono 3.0 came out in October 2012 and there have already been releases
of 3.0.1, 3.0.2 and 3.0.3 to fix (mostly) minor bugs. I made a bug fix back
in December and it's already in Mono 3.0.3. I think the Mono team are
aiming for frequent small releases rather than infrequent massive releases.


 I am a Mercurial guy so have to get used to GIT in the first place…

Git is very similar to Mercurial, it shouldn't take you too long to get
used to Git :)




On Mon, Jan 14, 2013 at 9:56 AM, fo...@arocholl.com wrote:

 Does Microsoft's implementation accept *any* baud rate, or are there
 only some that it accepts that Mono doesn't? If Microsoft's accepts any
 then maybe the baud rate validation should be moved from Mono.

 ** **

 Apparently, yes, MS accepts any baudrate but zero or lower than zero.

 ** **

 I tested several custom baudrate values and, as far as I can see, all them
 are accepted by .NET SerialPort. Perhaps the Microsoft approach is to ask
 the underlying driver to validate baudrates, if at all. In the case of the
 Windows CP2102 driver, it will accept any baudrate including ones that are
 not physically supported. For instance I tested 1,500,000bps which is not
 really going to work on the physical CP2102 hardware (max available speed
 is 920,000bps on the CP2102 device) and still the SerialPort accepts the
 1,500,000 bps, connects to it and if you read the baudrate property, it
 returns 1,500,000. So probably the Mono approach is too limited, because it
 really depends on a switch/case with a set of hardcoded, predefined values.
 

 ** **

 See a fraction of Serial.c below

 ** **

 switch (baud_rate)

 {

 ….

 case 115200: 

 baud_rate = B115200;

 break;

 case 57600:

 baud_rate = B57600;

 break;

 ….

 case 50:

 case 0:

 default:

 baud_rate = -1;

 break;

 }

 ** **

 Anything that is unknown goes to default which in the end returns an
 unsupported baudrate exception to the caller.

 ** **

 However, that doesn’t seem the way the Windows .NET SerialPort class works
 and, in today’s world of interconnected USB COM custom devices, it really
 puts a hard limit on baudrates you can use. Interestingly, the
 documentation of SerialPort::Open doesn’t explicitly document any baudrate
 value being invalid, except if it is equal or lower than zero. From MSDN:*
 ***

 ** **

 ArgumentOutOfRangeExceptionhttp://msdn.microsoft.com/en-us/library/system.argumentoutofrangeexception%28v=vs.100%29.aspx
 

 One or more of the properties for this instance are invalid. For example,
 the 
 Parityhttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.parity%28v=vs.100%29.aspx,
 DataBitshttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.databits%28v=vs.100%29.aspx,
 or 
 Handshakehttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.handshake%28v=vs.100%29.aspxproperties
  are not valid values; the
 BaudRatehttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.baudrate%28v=vs.100%29.aspxis
  less than or equal to zero; the
 ReadTimeouthttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.readtimeout%28v=vs.100%29.aspxor
 WriteTimeouthttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.writetimeout%28v=vs.100%29.aspxproperty
  is less than zero and is not
 InfiniteTimeouthttp://msdn.microsoft.com/en-us/library/system.io.ports.serialport.infinitetimeout%28v=vs.100%29.aspx.
 

 ** **

 ** **

 So except anyone disagree, baudrate values should not be checked for
 anything different than that. I will then fill in a bugzilla entry and pull
 a request in a few days. I am a Mercurial guy so have to get used to GIT in
 the first place…

 ** **

 In general terms, how often a new Mono version is released with all the
 accumulated fixes? I saw releases are probably a few months apart in the
 official download site, is that driven by a scheduled event of any kind?**
 **

 ** **

  You should be able to run make and make install in the directory
 of the file you're modifying, and that should compile and install just that
 component.

 ** **

 Thanks for the tip, this is much better. It works nicely.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___

Re: [Mono-dev] Absolute beginner

2013-01-03 Thread Daniel Lo Nigro
WinForms isn't too important, you can make programs without it (for
example, command-line programs). Linux GUI applications will generally use
GTK# instead of WinForms, as GTK is a standard GUI toolkit for Linux.
WinForms is good to learn if you want to make Windows applications that
look native on Windows.

You can also do web development (using ASP.NET MVC) if you want to go that
way. My personal site (http://dan.cx/) runs on Mono.


On Thu, Jan 3, 2013 at 9:54 PM, Shashvat Tripathi 
tripathi.shash...@gmail.com wrote:

 How important is learning winForms and Windows applications in C# for MONO
 development?


 On Tue, Jan 1, 2013 at 4:41 PM, Bartosz Przygoda bprzyg...@gmail.comwrote:

 Well, to add to 1. and 2.: Monodevelop reads VS sln/project files just
 fine, so you can use them interchangeably (with some manual tweaks in some
 cases, like changing the version number in first line of sln file (if you
 use vs2012), though I don't remember if it's still the case).


 On 1 January 2013 12:07, Shashvat Tripathi 
 tripathi.shash...@gmail.comwrote:

 Thanks a lot Daniel!
 You cleared up a lot of basic concepts for me!


 On Tue, Jan 1, 2013 at 1:17 PM, Daniel Lo Nigro li...@dan.cx wrote:

 2. I've read that Visual studio can be used as IDE...How do I do that?

 When you compile a C# program in Visual Studio, it generates a .exe
 file. You can run this EXE file under Mono by running mono filename.exe
 where filename.exe is the name of the file. By default, compiled programs
 will end up in a bin/Debug or bin/Release folder underneath your
 program folder.

 4. I tried going through the archives...but it's quite cluttered, or
 maybe I just too new to all this. How do I find sample code and some help
 material?

 Any C# tutorial is also relevant to Mono. Think of Mono as a separate
 runtime and different for .NET applications. The actual language and
 framework is the same.

 I guess it's a bit like C++ (although I have very little experience in
 C++ myself) - There's many different compiler implementations (Microsoft
 Visual C++, G++ on Linux, Borland C++, etc). Regardless of which compiler
 you use, the language itself stays pretty much the same, and you always
 have your standard library with all your basic functionality.

 When I was learning C# at university, I used a textbook by Apress
 called Pro C# and the .NET 3.5 Platform. I found it pretty good. There's
 a newer version available now that covers newer C# and .NET versions.


 On Mon, Dec 31, 2012 at 11:18 PM, Shashvat Tripathi 
 tripathi.shash...@gmail.com wrote:

 Hello Everyone!

 I am a COMPLETE newbie to this open-source-environment. I have a good
 base of C++ language and am interested in working in MONO because of its
 ultimate objective.
 I would appreciate if someone could help me start.  I have some very
 basic questions:
 1. Where do we code exactly, in MONO? (sorry for such noob question)
 2. I've read that Visual studio can be used as IDE...How do I do that?
 3. How do I know what to code?
 4. I tried going through the archives...but it's quite cluttered, or
 maybe I just too new to all this. How do I find sample code and some help
 material?

 Thanks a lot!

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Absolute beginner

2012-12-31 Thread Daniel Lo Nigro

 2. I've read that Visual studio can be used as IDE...How do I do that?

When you compile a C# program in Visual Studio, it generates a .exe file.
You can run this EXE file under Mono by running mono filename.exe where
filename.exe is the name of the file. By default, compiled programs will
end up in a bin/Debug or bin/Release folder underneath your program
folder.

4. I tried going through the archives...but it's quite cluttered, or maybe
 I just too new to all this. How do I find sample code and some help
 material?

Any C# tutorial is also relevant to Mono. Think of Mono as a separate
runtime and different for .NET applications. The actual language and
framework is the same.

I guess it's a bit like C++ (although I have very little experience in C++
myself) - There's many different compiler implementations (Microsoft Visual
C++, G++ on Linux, Borland C++, etc). Regardless of which compiler you use,
the language itself stays pretty much the same, and you always have your
standard library with all your basic functionality.

When I was learning C# at university, I used a textbook by Apress called
Pro C# and the .NET 3.5 Platform. I found it pretty good. There's a newer
version available now that covers newer C# and .NET versions.


On Mon, Dec 31, 2012 at 11:18 PM, Shashvat Tripathi 
tripathi.shash...@gmail.com wrote:

 Hello Everyone!

 I am a COMPLETE newbie to this open-source-environment. I have a good base
 of C++ language and am interested in working in MONO because of its
 ultimate objective.
 I would appreciate if someone could help me start.  I have some very basic
 questions:
 1. Where do we code exactly, in MONO? (sorry for such noob question)
 2. I've read that Visual studio can be used as IDE...How do I do that?
 3. How do I know what to code?
 4. I tried going through the archives...but it's quite cluttered, or maybe
 I just too new to all this. How do I find sample code and some help
 material?

 Thanks a lot!

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Thank you for your hard work :)

2012-12-26 Thread Daniel Lo Nigro
I just wanted to thank the Mono team for the awesome work that's been done
over the last few years with regards to ASP.NET MVC compatibility. I tried
out ASP.NET MVC 2 a few years ago (with Mono 2.8 or 2.10 I think) and there
were lots of small issues with getting it running, lots of edge cases that
broke things, and things that Mono did subtly different compared to
Microsoft .NET. It didn't feel like something that could be used in
production at all.

I recently decided to try it out again, rewriting my blog in C# using
ASP.NET MVC 4 and running it on Mono 3. I used the latest version of all
these libraries:

   - ASP.NET http://asp.net/ MVC 4 with Razor 2 and its built-in CSS and
   JS minification (WebGrease)
   - ServiceStack
OrmLitehttps://github.com/ServiceStack/ServiceStack.OrmLite with
   MySql.Data for the data access layer
   - SimpleInjector http://simpleinjector.codeplex.com/ for IoC /
   Dependency injection
   - DotLESS http://www.dotlesscss.org/ for CSS preprocessing
   - ELMAH http://code.google.com/p/elmah/ for error logging

It turns out that all of these work fine with Mono 3.0.2, and the site is
running just as well as it does on Microsoft .NET. The live site is at
http://dan.cx/ and http://dan.cx/blog, and the source code is available on
Github (https://github.com/Daniel15/Website)

On behalf of everyone using Mono to run ASP.NET MVC sites, thank you! And
keep up the great work. It's really appreciated. :)

--
Regards,
Daniel Lo Nigro
http://dan.cx/ | http://twitter.com/Daniel15
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Issue with URL routing not properly utilising default parameters

2012-12-22 Thread Daniel Lo Nigro
I'm curious as to if anyone has experienced this issue before. Given the
following routes:

// Blog home page - Don't include page number in URL for first page
routes.MapRoute(
name: BlogHome,
url: blog,
defaults: new { controller = Blog, action = Index, page = 1 }
);
routes.MapRoute(
name: BlogHomePage,
url: blog/page-{page},
defaults: new { controller = Blog, action = Index },
constraints: new { page = @\d+ }
);

And this ASP.NET MVC action:
public ActionResult Index(int page = 1) { ... }

Microsoft .NET is smart enough to use the first route if you build a URL
with page = 1 (something like Url.Action(Index, Blog, new { page = 1 })
in ASP.NET MVC) and the second route when the page number isn't 1. However,
Mono is always using the second route, even when page = 1. In theory it
should be matching the first rule as it's added first (and thus should have
higher priority).

I've worked around this in my code by explicitly specifying which route to
use:

public static string BlogIndex(this UrlHelper urlHelper, int page = 1)
{
return page == 1
? urlHelper.RouteUrl(BlogHome)
: urlHelper.RouteUrl(BlogHomePage, new { page = page });
}

I have reported this as a bug (
https://bugzilla.xamarin.com/show_bug.cgi?id=9116) but I'm curious as to if
it's a known issue with Mono's URL routing implementation.

I was going to try the Microsoft .NET implementation with Mono but it looks
like Microsoft's implementation is in the core System.Web assembly in .NET
4.0 (instead of being in a separate System.Web.Routing assembly)

Thanks,
 - Daniel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Issue with URL routing not properly utilising default parameters

2012-12-22 Thread Daniel Lo Nigro
I fixed this but Github is currently down :(

I'll submit my fix as a pull request once Github is back up.


On Sat, Dec 22, 2012 at 7:32 PM, Daniel Lo Nigro li...@dan.cx wrote:

 I'm curious as to if anyone has experienced this issue before. Given the
 following routes:

 // Blog home page - Don't include page number in URL for first page
 routes.MapRoute(
 name: BlogHome,
 url: blog,
  defaults: new { controller = Blog, action = Index, page = 1 }
 );
 routes.MapRoute(
 name: BlogHomePage,
 url: blog/page-{page},
  defaults: new { controller = Blog, action = Index },
 constraints: new { page = @\d+ }
 );

 And this ASP.NET MVC action:
 public ActionResult Index(int page = 1) { ... }

 Microsoft .NET is smart enough to use the first route if you build a URL
 with page = 1 (something like Url.Action(Index, Blog, new { page = 1 })
 in ASP.NET MVC) and the second route when the page number isn't 1.
 However, Mono is always using the second route, even when page = 1. In
 theory it should be matching the first rule as it's added first (and thus
 should have higher priority).

 I've worked around this in my code by explicitly specifying which route to
 use:

 public static string BlogIndex(this UrlHelper urlHelper, int page = 1)
 {
 return page == 1
 ? urlHelper.RouteUrl(BlogHome)
  : urlHelper.RouteUrl(BlogHomePage, new { page = page });
 }

 I have reported this as a bug (
 https://bugzilla.xamarin.com/show_bug.cgi?id=9116) but I'm curious as to
 if it's a known issue with Mono's URL routing implementation.

 I was going to try the Microsoft .NET implementation with Mono but it
 looks like Microsoft's implementation is in the core System.Web assembly in
 .NET 4.0 (instead of being in a separate System.Web.Routing assembly)

 Thanks,
  - Daniel

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Fwd: mysql-connector ArgumentNullException

2012-12-18 Thread Daniel Lo Nigro
What version of the MySQL library are you using? I'm using MySql.Data 6.5.4
from NuGet http://nuget.org/packages/Mysql.Data and it's working for me
on Mono 3.0.2.

My connection string looks like this:
Server=10.0.2.1; Database=daniel15_dev; Uid=username; Pwd=password;


On Mon, Dec 10, 2012 at 12:46 AM, lth3726381 lth3726...@gmail.com wrote:

 Thanks 4 your reply:

 I tried the correct username and pwd,but there is another similar question:


 System.ArgumentNullException: Argument cannot be null.
 Parameter name: key
   at System.Resources.ResourceManager.InternalGetResourceSet
 (System.Globalization.CultureInfo culture, Boolean createIfNotExists,
 Boolean tryParents) [0x0023c] in

 /home/l/桌面/mono_src/mcs/class/corlib/System.Resources/ResourceManager.cs:439
   at System.Resources.ResourceManager.InternalGetResourceSet
 (System.Globalization.CultureInfo culture, Boolean createIfNotExists,
 Boolean tryParents) [0x00209] in

 /home/l/桌面/mono_src/mcs/class/corlib/System.Resources/ResourceManager.cs:430
   at System.Resources.ResourceManager.InternalGetResourceSet
 (System.Globalization.CultureInfo culture, Boolean createIfNotExists,
 Boolean tryParents) [0x00209] in

 /home/l/桌面/mono_src/mcs/class/corlib/System.Resources/ResourceManager.cs:430
   at System.Resources.ResourceManager.GetString (System.String name,
 System.Globalization.CultureInfo culture) [0x0002e] in

 /home/l/桌面/mono_src/mcs/class/corlib/System.Resources/ResourceManager.cs:252
   at MySql.Data.MySqlClient.Properties.Resources.get_PerfMonCategoryName ()
 [0x0] in filename unknown:0
   at MySql.Data.MySqlClient.PerformanceMonitor..ctor
 (MySql.Data.MySqlClient.MySqlConnection connection) [0x0] in filename
 unknown:0
   at MySql.Data.MySqlClient.MySqlConnection.Open () [0x0] in filename
 unknown:0
   at Tutorial1.Main () [0x00019] in /home/l/Projects/MySql/MySql/Main.cs:17
 Done.


 My connetion string is :
 string connStr =
 server=localhost;user=root;database=exp;port=3306;password=l;;
 and I tried:
 string connStr = Server=localhost; + Database=exp; + User ID=root; +
 Password=l; + Pooling=false;

 the user and password is correct.

 BTW , my program run corrected before I compiled the new mono source.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/mysql-connector-ArgumentNullException-tp4657666p4657714.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono 3.0.2 and Asp.Net MVC3 issue

2012-12-13 Thread Daniel Lo Nigro
I found the same issue when getting Mono 3.0 + XSP working. I'm not sure
why the downloads folder doesn't have the latest XSP version available.


On Thu, Dec 13, 2012 at 3:56 AM, Matteo Tesser matteo.tes...@gmail.comwrote:

 Thanks to everybody,
 I confirm that if we use the latest xsp got from github everything works
 fine

 our wrong assumptions was that the latest xsp could be found below
 http://download.mono-project.com/sources/xsp/

 Matteo




 On Wed, Dec 12, 2012 at 5:10 PM, Rodrigo Kumpera kump...@gmail.comwrote:

 XSP version to be used with mono must be the same one as of mono. We
 don't support mixing different versions.


 On Wed, Dec 12, 2012 at 7:19 AM, Daniel Lo Nigro li...@dan.cx wrote:

 Also I don't think XSP 2.10.2 is fully compatible with Mono 3. There's
 been some small changes and you will either need to grab the 3.0 version
 from Github (either the 3.0 tag, or the latest master version if you want
 the latest fixes). See https://github.com/mono/xsp


 On Wed, Dec 12, 2012 at 11:16 PM, Daniel Lo Nigro li...@dan.cx wrote:

 This usually points to an error in your Web.config file. Ensure it
 doesn't have any references to Entity Framework, as Mono doesn't support
 Entity Framework (other than the alpha version of Entity Framework 6).

 Can you post your whole Web.config file (removing any sensitive data if
 necessary)?


 On Wed, Dec 12, 2012 at 9:40 PM, Matteo Tesser matteo.tes...@gmail.com
  wrote:

 Hello,
 We have some trouble to run an Asp.Net MVC3 under mono 3.0.2 (profile
 .NET 4.0)  The webapp runs fine under mono 2.10.9.

 In details, we are using  lighttpd 1.4.28 (ssl) webserver. the fastcgi
 configuration file is the following:

 fastcgi.server = (
  = ((
 socket = /tmp/fastcgi-mono-server,
 bin-path = /opt/mono/bin/fastcgi-mono-server4,
 bin-environment = (
 PATH = /bin:/usr/bin:/opt/mono/bin,
 LD_LIBRARY_PATH = /opt/mono/lib:,
 MONO_SHARED_DIR = /tmp/,
 MONO_FCGI_LOGLEVELS = Standard,
 MONO_FCGI_LOGFILE = /tmp/fastcgi.log,
 MONO_FCGI_ROOT = /var/www/html/ourwebapp,
 MONO_FCGI_APPLICATIONS = /:.
 ),
 max-procs = 1,
 check-local = disable
 ))
 )

 On the server we installed side-by-side either mono Mono 2.10.9 and
 Mono 3.0.2 while executing the web application using lighttp with mono
 2.10.9 no big issues are found,  when we use mono 3.0.2  and  the latest
 XSP (2.10.2) we obtain an empty responses on the client side and the
 following error on the server log


 [2012-12-12 10:06:46Z] Notice  Beginning to receive records on
 connection.
 [2012-12-12 10:06:47Z] Error   ERROR PROCESSING REQUEST:
 System.TypeInitializationException: An exception was thrown by the type
 initializer for Mono.WebServer.FastCgi.WorkerRequest

 Server stack trace:
   at Mono.WebServer.FastCgi.ApplicationHost.ProcessRequest
 (Mono.WebServer.FastCgi.Responder responder) [0x0] in filename
 unknown:0
   at (wrapper remoting-invoke-with-check)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at (wrapper xdomain-dispatch)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (object,byte[],byte[])

 Exception rethrown at [0]:
  --- System.InvalidCastException: Cannot cast from source type to
 destination type.
   at System.Configuration.ConfigurationManager.get_AppSettings ()
 [0x0] in filename unknown:0
   at Mono.WebServer.FastCgi.WorkerRequest..cctor () [0x0] in
 filename unknown:0
   --- End of inner exception stack trace ---
   at (wrapper xdomain-invoke)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at (wrapper remoting-invoke-with-check)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at Mono.WebServer.FastCgi.Responder.Process () [0x0] in
 filename unknown:0
 [2012-12-12 10:06:47Z] Notice  Finished receiving records on
 connection.


 Are we missing something?

 Thanks for any hint,
 best regards,
 Matteo


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono 3.0.2 and Asp.Net MVC3 issue

2012-12-12 Thread Daniel Lo Nigro
This usually points to an error in your Web.config file. Ensure it doesn't
have any references to Entity Framework, as Mono doesn't support Entity
Framework (other than the alpha version of Entity Framework 6).

Can you post your whole Web.config file (removing any sensitive data if
necessary)?


On Wed, Dec 12, 2012 at 9:40 PM, Matteo Tesser matteo.tes...@gmail.comwrote:

 Hello,
 We have some trouble to run an Asp.Net MVC3 under mono 3.0.2 (profile .NET
 4.0)  The webapp runs fine under mono 2.10.9.

 In details, we are using  lighttpd 1.4.28 (ssl) webserver. the fastcgi
 configuration file is the following:

 fastcgi.server = (
  = ((
 socket = /tmp/fastcgi-mono-server,
 bin-path = /opt/mono/bin/fastcgi-mono-server4,
 bin-environment = (
 PATH = /bin:/usr/bin:/opt/mono/bin,
 LD_LIBRARY_PATH = /opt/mono/lib:,
 MONO_SHARED_DIR = /tmp/,
 MONO_FCGI_LOGLEVELS = Standard,
 MONO_FCGI_LOGFILE = /tmp/fastcgi.log,
 MONO_FCGI_ROOT = /var/www/html/ourwebapp,
 MONO_FCGI_APPLICATIONS = /:.
 ),
 max-procs = 1,
 check-local = disable
 ))
 )

 On the server we installed side-by-side either mono Mono 2.10.9 and  Mono
 3.0.2 while executing the web application using lighttp with mono 2.10.9
 no big issues are found,  when we use mono 3.0.2  and  the latest XSP
 (2.10.2) we obtain an empty responses on the client side and the following
 error on the server log


 [2012-12-12 10:06:46Z] Notice  Beginning to receive records on connection.
 [2012-12-12 10:06:47Z] Error   ERROR PROCESSING REQUEST:
 System.TypeInitializationException: An exception was thrown by the type
 initializer for Mono.WebServer.FastCgi.WorkerRequest

 Server stack trace:
   at Mono.WebServer.FastCgi.ApplicationHost.ProcessRequest
 (Mono.WebServer.FastCgi.Responder responder) [0x0] in filename
 unknown:0
   at (wrapper remoting-invoke-with-check)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at (wrapper xdomain-dispatch)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (object,byte[],byte[])

 Exception rethrown at [0]:
  --- System.InvalidCastException: Cannot cast from source type to
 destination type.
   at System.Configuration.ConfigurationManager.get_AppSettings ()
 [0x0] in filename unknown:0
   at Mono.WebServer.FastCgi.WorkerRequest..cctor () [0x0] in filename
 unknown:0
   --- End of inner exception stack trace ---
   at (wrapper xdomain-invoke)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at (wrapper remoting-invoke-with-check)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at Mono.WebServer.FastCgi.Responder.Process () [0x0] in filename
 unknown:0
 [2012-12-12 10:06:47Z] Notice  Finished receiving records on connection.


 Are we missing something?

 Thanks for any hint,
 best regards,
 Matteo


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono 3.0.2 and Asp.Net MVC3 issue

2012-12-12 Thread Daniel Lo Nigro
Also I don't think XSP 2.10.2 is fully compatible with Mono 3. There's been
some small changes and you will either need to grab the 3.0 version from
Github (either the 3.0 tag, or the latest master version if you want the
latest fixes). See https://github.com/mono/xsp


On Wed, Dec 12, 2012 at 11:16 PM, Daniel Lo Nigro li...@dan.cx wrote:

 This usually points to an error in your Web.config file. Ensure it doesn't
 have any references to Entity Framework, as Mono doesn't support Entity
 Framework (other than the alpha version of Entity Framework 6).

 Can you post your whole Web.config file (removing any sensitive data if
 necessary)?


 On Wed, Dec 12, 2012 at 9:40 PM, Matteo Tesser matteo.tes...@gmail.comwrote:

 Hello,
 We have some trouble to run an Asp.Net MVC3 under mono 3.0.2 (profile
 .NET 4.0)  The webapp runs fine under mono 2.10.9.

 In details, we are using  lighttpd 1.4.28 (ssl) webserver. the fastcgi
 configuration file is the following:

 fastcgi.server = (
  = ((
 socket = /tmp/fastcgi-mono-server,
 bin-path = /opt/mono/bin/fastcgi-mono-server4,
 bin-environment = (
 PATH = /bin:/usr/bin:/opt/mono/bin,
 LD_LIBRARY_PATH = /opt/mono/lib:,
 MONO_SHARED_DIR = /tmp/,
 MONO_FCGI_LOGLEVELS = Standard,
 MONO_FCGI_LOGFILE = /tmp/fastcgi.log,
 MONO_FCGI_ROOT = /var/www/html/ourwebapp,
 MONO_FCGI_APPLICATIONS = /:.
 ),
 max-procs = 1,
 check-local = disable
 ))
 )

 On the server we installed side-by-side either mono Mono 2.10.9 and  Mono
 3.0.2 while executing the web application using lighttp with mono 2.10.9
 no big issues are found,  when we use mono 3.0.2  and  the latest XSP
 (2.10.2) we obtain an empty responses on the client side and the following
 error on the server log


 [2012-12-12 10:06:46Z] Notice  Beginning to receive records on connection.
 [2012-12-12 10:06:47Z] Error   ERROR PROCESSING REQUEST:
 System.TypeInitializationException: An exception was thrown by the type
 initializer for Mono.WebServer.FastCgi.WorkerRequest

 Server stack trace:
   at Mono.WebServer.FastCgi.ApplicationHost.ProcessRequest
 (Mono.WebServer.FastCgi.Responder responder) [0x0] in filename
 unknown:0
   at (wrapper remoting-invoke-with-check)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at (wrapper xdomain-dispatch)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (object,byte[],byte[])

 Exception rethrown at [0]:
  --- System.InvalidCastException: Cannot cast from source type to
 destination type.
   at System.Configuration.ConfigurationManager.get_AppSettings ()
 [0x0] in filename unknown:0
   at Mono.WebServer.FastCgi.WorkerRequest..cctor () [0x0] in
 filename unknown:0
   --- End of inner exception stack trace ---
   at (wrapper xdomain-invoke)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at (wrapper remoting-invoke-with-check)
 Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest
 (Mono.WebServer.FastCgi.Responder)
   at Mono.WebServer.FastCgi.Responder.Process () [0x0] in filename
 unknown:0
 [2012-12-12 10:06:47Z] Notice  Finished receiving records on connection.


 Are we missing something?

 Thanks for any hint,
 best regards,
 Matteo


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Performance of compiled regular expressions?

2012-12-03 Thread Daniel Lo Nigro
Some of the regular expressions in MarkdownSharp look very complex and I
wouldn't be surprised if the Mono engine has trouble with them.

If MarkdownSharp is where most of your performance loss is coming from,
have you considered caching the HTML output so the parsing doesn't have to
happen on every page load? On an ASP.NET website you should be able to use
the output cache to handle caching. Alternatively, if your site's content
is in a database, you could have a column for the Markdown source and a
column for the HTML output, and just regenerate the HTML whenever a post is
edited.

Just throwing some ideas around :)


On Tue, Dec 4, 2012 at 2:25 AM, Rodrigo Kumpera kump...@gmail.com wrote:

 Mono's regex engine cannot compile a lot of expressions and it might be
 your case.
 In such scenarios it silently fallback to the interpreter.


 On Sun, Dec 2, 2012 at 9:20 PM, Jordan Earls ea...@lastyearswishes.comwrote:


 Is there anything I can do to mitigate this problem? I'm using the
 latest stable version of Mono (Arch Linux) on a 64-bit platform. Is it
 true also that regular expression should now be on par with .Net's
 implementation? From what I understand, mono compiles them to IL



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Performance of compiled regular expressions?

2012-12-02 Thread Daniel Lo Nigro
Are you sure your site is running in release mode (debug=false in your
web.config, and Release build config for assemblies)? Running in debug mode
will turn off lots of optimisations that may cause slowdown.

It might be worth trying out
Regex.CompileToAssemblyhttp://msdn.microsoft.com/en-us/library/9ek5zak6.aspxto
precompile your regular expressions - This will create a separate .NET
assembly which has pre-optimised versions of the regular expressions.
However I've found this is only beneficial for very large regular
expressions, and regular expressions that are used a lot. So it might not
help too much (but it doesn't hurt to try it to see if it makes a
difference or not). As far as I know, Mono doesn't
support Regex.CompileToAssembly, but you should be able to generate the
assembly on Microsoft .NET, and then use the generated assembly with Mono.
I haven't tried this myself though.

Out of curiosity, how are you profiling the code?


On Mon, Dec 3, 2012 at 1:20 PM, Jordan Earls ea...@lastyearswishes.comwrote:

 So, I recently did a major update to my ASP.Net website running on
 Mono (runs on .Net as well, but I work on it and host it with Mono).
 Long story short, my websites performance sunk big time. It now takes
 110ms for a response that once took less than 20ms.

 I traced down the big difference to using regular expressions as a
 part of my routing and a few other things. (I have a custom MVC
 framework: https://bitbucket.org/earlz/barelymvc).

 Here are some(maybe all) of the regular expressions being used
 (they're really simple):

 @[^a-zA-Z0-9]\ 
 @[^a-zA-Z0-9\-]
 ^[0-9a-zA-Z]+$
 @^[-+]?[0-9]*\.?[0-9]+$
  ^[-+]?[0-9]*$
 ^[0-9A-Fa-f]+$

 All of these regular expressions are compiled once at application
 startup and cached. (with RegexOptions.Compiled). They are used with
 with IsMatch(input) or Replace(input, replacement);

 When profiling my application however, the number one most time
 consuming method was `System.Text.RegularExpressions.Interpreter:Eval
 (System.Text.RegularExpressions.Interpreter/Mode,int,int)` (my
 database functions, which are also not really fast didn't even compare
 to the amount of time this function consumed)

 Is there anything I can do to mitigate this problem? I'm using the
 latest stable version of Mono (Arch Linux) on a 64-bit platform. Is it
 true also that regular expression should now be on par with .Net's
 implementation? From what I understand, mono compiles them to IL
 correct? Is there anything to watch for in regular expressions that
 could give me performance problems like this?

 Thanks,
 Jordan
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Trying figure out EF6

2012-11-22 Thread Daniel Lo Nigro
Thanks, I was unaware of that. Good to know :)

I gave up on getting EF6 working and instead switched to OrmLite from
ServiceStack:
https://github.com/ServiceStack/ServiceStack.OrmLite

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On Nov 23, 2012 3:59 AM, Raul U. ruri...@yahoo.es wrote:

 Hi Daniel, that is not all the truth, I think. Entity Framework 6 has some
 “little” breaking changes:

 ** **

 -
 http://entityframework.codeplex.com/wikipage?title=Rebuilding%20EF%20providers%20for%20EF6
 

 -
 http://entityframework.codeplex.com/wikipage?title=Updating%20Applications%20to%20use%20EF6
 

 ** **

 I´ve managed to do this changes. Unfortunately, there are some minor error
 after that… for instance, _migrationhistory table comes with a compound
 primary key index, too long for MySql (see
 http://entityframework.codeplex.com/discussions/403680 for details) and
 more...

 ** **

 I hope those things can be fixed soon, I´ll post back about it if someone
 is interested in.

 ** **

 *De:* dan...@d15.biz [mailto:dan...@d15.biz] *En nombre de *Daniel Lo
 Nigro
 *Enviado el:* sábado, 10 de noviembre de 2012 1:51
 *Para:* Raul U.
 *CC:* mono-devel-list
 *Asunto:* Re: [Mono-dev] Trying figure out EF6

 ** **

 Entity Framework uses the standard ADO.NET providers, so most 
 ADO.NETproviders should work with it. This includes the MySQL one, which comes
 with Ubuntu and Debian in the libmysql6.4-cli package, or you can
 download it from http://dev.mysql.com/downloads/connector/net/. Just
 reference MySQL.Data.dll and set up your App.config or Web.config
 correctly. Here is an example config:

 ** **

 ?xml version=1.0 encoding=utf-8?

 configuration

  system.data

   DbProviderFactories

   add name=MySQL Data Provider
 invariant=MySql.Data.MySqlClient description=.Net Framework Data
 Provider for MySQL type=MySql.Data.MySqlClient.MySqlClientFactory,
 MySql.Data /

   /DbProviderFactories

  /system.data

  connectionStrings

   add name=BloggingContext 

connectionString=Server=localhost; Database=dotnettest;
 Uid=root; Pwd=password

providerName=MySql.Data.MySqlClient /

  /connectionStrings

 /configuration

 ** **

 ** **

 Obviously, change all the placeholder values (context name, server name,
 database, username, password). You will need to use a very recent version
 of Mono (3.0.1 or trunk) due to bug 
 7396https://bugzilla.xamarin.com/show_bug.cgi?id=7936
 .

 ** **

 On Sat, Nov 10, 2012 at 7:45 AM, Raul U. ruri...@yahoo.es wrote:

 Hi, I´m trying to use Entity Framework, I would like to use MySql. In my
 understanding there is no EF6 provider yet, so this is not possible. In
 fact, I only found two providers available for EF, SQL Server and SQL CE.*
 ***

  

 Is this right? Is there any other option out there?

  

 Thx.

  


 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ** **

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] How scaleable is Mono?

2012-11-18 Thread Daniel Lo Nigro
You could try a load test with something like http://blitz.io/ and see how
your server handles 250 simultaneous users. I'm not sure how well Apache +
mod_mono would work but nginx or Cherokee + Mono FastCGI seems to be able
to handle quite a bit of load.

It's worth noting that http://www.servicestack.net/ is powered by Mono.
ServiceStack is one of the most popular .NET libraries on Github and their
site seems to handle things fine. Mozilla's developer wiki (a very popular
reference for web developers) was also powered by Mono until recently
(they've now migrated from DekuWiki to their own custom Django wiki system).


On Sun, Nov 18, 2012 at 9:58 AM, Frank Cohen frankensp...@gmail.com wrote:

 I am running mono under apache2/mod_mono.  Currently using it for some low
 traffic sites, but I am wondering, does it scale?

 Anyone have a list of case studies using it?

 Thanks in advance,

 Frank

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] How scaleable is Mono?

2012-11-18 Thread Daniel Lo Nigro
I've been playing with Nginx along with Mono FastCGI but I don't have any
live sites using it at the moment. I do have a PHP site running on Nginx
and it can handle more many more simultaneous requests compared to Apache
and mod_php.

As far as I know, nginx was designed from the ground-up to handle large
amounts of traffic. It has some options for caching, so using its cache
along with output caching in your ASP.NET site should help with scaling.
Once you start using nginx's cache, cached pages won't even send a request
to Mono, they'll be served straight out of RAM (which will give you a
massive boost in terms of performance).

I like Cherokee more than Nginx, but I've been moving away from it since
development seems very slow these days and there's a number of bugs that
have been around for a while. To me, Nginx was the second best, but its
development is very constant and its market share keeps growing.


On Mon, Nov 19, 2012 at 2:52 AM, Frank Cohen frankensp...@gmail.com wrote:

 Thanks for the suggestions.  Blitz looks like a really useful tool.
  Seeing as ServiceStack is so popular, I am surprised I
 haven't investigated it yet.  From the looks of it, would fit nicely with a
 highly-scalable design.

 Do you have any hands-on experience Nginx or Cherokee?  Mainly looking to
 see if there are any pitfalls or gotchas to avoid. I've been doing some
 general scalability research and Nginx has come up a number of times, and
 it does seem to be more performant than Apache from what I've read.


 On Sun, Nov 18, 2012 at 7:31 AM, Daniel Lo Nigro li...@dan.cx wrote:

 You could try a load test with something like http://blitz.io/ and see
 how your server handles 250 simultaneous users. I'm not sure how well
 Apache + mod_mono would work but nginx or Cherokee + Mono FastCGI seems to
 be able to handle quite a bit of load.

 It's worth noting that http://www.servicestack.net/ is powered by Mono.
 ServiceStack is one of the most popular .NET libraries on Github and their
 site seems to handle things fine. Mozilla's developer wiki (a very popular
 reference for web developers) was also powered by Mono until recently
 (they've now migrated from DekuWiki to their own custom Django wiki system).


 On Sun, Nov 18, 2012 at 9:58 AM, Frank Cohen frankensp...@gmail.comwrote:

 I am running mono under apache2/mod_mono.  Currently using it for some
 low traffic sites, but I am wondering, does it scale?

 Anyone have a list of case studies using it?

 Thanks in advance,

 Frank

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Inspecting x86 assembly

2012-11-16 Thread Daniel Lo Nigro
You can use Ahead of Time compilation to generate a .so file with native
code. Is this what you're looking for?

http://www.mono-project.com/AOT


On Fri, Nov 16, 2012 at 7:15 PM, Stack Pointer stackpoin...@me.com wrote:

 I want to inspect the x86 assembly that mono generates from my .exe.
 Mostly for specific functions. How do I achieve this?

 $ mono --help-devel

 tells me that I could compile a method and generate assembly for it. How
 should I be using it? If I do:
 $ mono --ncompile 1 --compile METHODNAME EXENAME EXEOPTIONS

 I get an error saying:
 Usage: mini --ncompile num --compile method assembly

 How do you guys inspect the generated assembly while developing? Is there
 some other internal option that enables that?

 Thanks,
 Vrajesh
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] possible bug in ConcurrentDictionary

2012-11-15 Thread Daniel Lo Nigro
As far as I can tell, this was fixed way back in 2010. There is a changeset
labelled as Add support for storing elements with the same hashcode in
ConcurrentDictionary. Add corresponding unit test. and the line you quoted
was changed to this:

internalDictionary.Delete (Hash (key), key, out data);

https://github.com/mono/mono/commit/09185b9e811dfe702809cfd5960e523ca8f4e7f6


On Thu, Nov 15, 2012 at 8:19 PM, Debacker deback...@gmail.com wrote:

 Hello,

 While reading the code of ConcurrentDictionary and SplitOrderedList, I
 believe I have identified an issue. In method
 ConcurrentDictionary.TryRemove, you'll see this line:

 bool result = internalDictionary.Delete (Hash (key), out data);

 Only key's hash is used, not the key itself. Consequently, two
 different keys with hash collision will be indistinguishable by
 SplitOrderedList.

 Key hash collisions are probably very rare, but it's not standard
 compliant.

 Regards,
 Laurent Debacker
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Equivalent of csc /link for mcs (COM interop)?

2012-11-13 Thread Daniel Lo Nigro
Have you tried using the newer dynamic stuff to do your COM interop calls?

http://www.codeproject.com/Tips/143694/Get-rid-of-COM-Interop-DLL-by-using-the-new-C-4-dy
http://msdn.microsoft.com/en-us/magazine/ff714583.aspx


On Wed, Nov 14, 2012 at 4:27 AM, Peter Dillinger pcd...@gmail.com wrote:

 (This message was not accepted from my work email and or from the
 forum interface.  Trying personal email...)

 In investigating the ability to drop in mcs as a replacement for csc
 (currently trying out mono 2.11.4), I've run into issues in compiling
 things from some Microsoft C# 4.0 code samples that involve COM
 interop.  Here's a simplified example:

 public class Program
 {
 public static void Test(Microsoft.Office.Interop.Excel.Application xl)
 {
 xl.Columns[2].AutoFit();
 }
 public static void Test2(Microsoft.Office.Interop.Excel.Range r)
 {
 r.Value = 42;
 }
 }

 Compiling this with csc requires -link (aka /link), as seen here:

 $ cp /cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\
 10.0/Visual\ Studio\ Tools\ for\
 Office/PIA/Office12/Microsoft.Office.Interop.Excel.dll .
 $ /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe
 -target:library
   -link:Microsoft.Office.Interop.Excel.dll Program.cs
 Microsoft (R) Visual C# Compiler version 4.0.30319.17929
 for Microsoft (R) .NET Framework 4.5
 Copyright (C) Microsoft Corporation. All rights reserved.
 $ /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe
 -target:library
   -r:Microsoft.Office.Interop.Excel.dll Program.cs
 Microsoft (R) Visual C# Compiler version 4.0.30319.17929
 for Microsoft (R) .NET Framework 4.5
 Copyright (C) Microsoft Corporation. All rights reserved.

 Program.cs(5,23): error CS1061: 'object' does not contain a definition
 for 'AutoFit' and no extension method 'AutoFit' accepting a first
 argument of type 'object' could be found (are you missing a using
 directive or an assembly reference?)
 $

 So trying to compile this with mcs, it seems the closest we can come
 to -link is to replace with -r, so we would expect it to fail
 similarly to mcs above, which it does for 'Test' but 'Test2' has other
 problems:

 $ /cygdrive/c/Program\ Files\ \(x86\)/Mono-2.11.4/bin/mcs.bat
 -target:library
   -r:Microsoft.Office.Interop.Excel.dll Program.cs
 Program.cs(5,23): error CS1061: Type `object' does not contain a
 definition for `AutoFit' and no extension method `AutoFit' of type
 `object' could be found. Are you missing an assembly reference?
 C:\PROGRA~2\MONO-2~1.4\lib\mono\4.5\mscorlib.dll (Location of the
 symbol related to previous error)
 Program.cs(9,11): error CS1546: Property or event
 `Microsoft.Office.Interop.Excel.Range.Value' is not supported by the
 C# language
 D:\scalability-csharp\test-cs4codesamples-orig\samples\This sample
 shows how to use the\C#\Microsoft.Office.Interop.Excel.dll (Location
 of the symbol related to previous error)
 Program.cs(9,11): error CS0200: Property or indexer
 `Microsoft.Office.Interop.Excel.Range.Value' cannot be assigned to (it
 is read-only)
 Compilation failed: 3 error(s), 0 warnings
 $

 This leads me to two questions:

 (1) Is there any plan to support an equivalent of csc -link (aka
 /link)?  Or is there some other work-around I don't know about?

 (2) It appears that the is not supported by the C# language+cannot
 be assigned to issue a bug.  Is that correct?  (If so, I can file
 it.)

 And a bonus question:

 (3) For general C# language issues where csc willingly compiles
 something that is arguably not adherent to the language spec, but mcs
 rejects it, does the Mono team consider that a valid bug or
 enhancement request?  (Is there a duplicate Microsoft's bugs mode
 for mcs?)

 Thanks for your help,


 Peter Dillinger | Senior Engineer
 Coverity | 185 Berry Street | Suite 6500, Lobby 3 | San Francisco, CA 94107
 The Leader in Development Testing
 Read our profile in Forbes, Coverity Gets Code Right 25% Faster
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Trying figure out EF6

2012-11-09 Thread Daniel Lo Nigro
Entity Framework uses the standard ADO.NET providers, so most
ADO.NETproviders should work with it. This includes the MySQL one,
which comes
with Ubuntu and Debian in the libmysql6.4-cli package, or you can
download it from http://dev.mysql.com/downloads/connector/net/. Just
reference MySQL.Data.dll and set up your App.config or Web.config
correctly. Here is an example config:

?xml version=1.0 encoding=utf-8?
configuration
system.data
DbProviderFactories
add name=MySQL Data Provider invariant=MySql.Data.MySqlClient
description=.Net Framework Data Provider for MySQL
type=MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data /
/DbProviderFactories
/system.data
connectionStrings
  add name=BloggingContext
   connectionString=Server=localhost; Database=dotnettest; Uid=root;
Pwd=password
   providerName=MySql.Data.MySqlClient /
/connectionStrings
/configuration


Obviously, change all the placeholder values (context name, server name,
database, username, password). You will need to use a very recent version
of Mono (3.0.1 or trunk) due to bug
7396https://bugzilla.xamarin.com/show_bug.cgi?id=7936
.


On Sat, Nov 10, 2012 at 7:45 AM, Raul U. ruri...@yahoo.es wrote:

 Hi, I´m trying to use Entity Framework, I would like to use MySql. In my
 understanding there is no EF6 provider yet, so this is not possible. In
 fact, I only found two providers available for EF, SQL Server and SQL CE.*
 ***

 ** **

 Is this right? Is there any other option out there?

 ** **

 Thx.

 ** **

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] wrong CS0314 error from compiler on generic method override

2012-11-06 Thread Daniel Lo Nigro
That bug was only reported a day or two ago so it's unlikely it's been
looked at yet. I'm sure that developers would post a comment on the bug if
it was being looked at.


On Wed, Nov 7, 2012 at 5:20 AM, Giacomo Tesio giac...@tesio.it wrote:

 Anyone looking at this bug
 https://bugzilla.xamarin.com/show_bug.cgi?id=8232 ?


 Giacomo

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Is there a build option to build the mono class library?

2012-10-28 Thread Daniel Lo Nigro
Have you tried running make in the mcs/class directory?

On Mon, Oct 29, 2012 at 2:51 AM, keithgchapman keithgchap...@gmail.comwrote:

 I need to play around with the mono class library to do some experiments.
 Is
 there a build option that enables me to build the class library? Trying to
 be more efficient by simply building the piece that I need.



 --
 View this message in context:
 http://mono.1490590.n4.nabble.com/Is-there-a-build-option-to-build-the-mono-class-library-tp4657155.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] ASP.NET Web API on Mono 3.0 (Could not load type 'System.Web.Http.WebHost.HttpControllerHandler')

2012-10-24 Thread Daniel Lo Nigro
Thanks for your reply.

I found that my app is referencing version 2.0.0.0 of System.Net.Http.dll,
probably because I'm only using .NET Framework 4.0 (not 4.5) on my Windows
machine. I created an assembly binding in my Web.config to redirect to the
newer version:

  dependentAssembly
assemblyIdentity name=System.Net.Http
publicKeyToken=b03f5f7f11d50a3a /
bindingRedirect oldVersion=2.0.0.0 newVersion=4.0.0.0 /
  /dependentAssembly

I'll raise a bug for the missing IHostBufferPolicySelector interface. I
tried working around this by uploading a copy of the Microsoft build of
System.Net.Http.dll 4.0.0.0.

This got the basic site working (the Welcome to ASP.NET Web API page in
the default template), but I'm getting this error whenever I try to use a
WebAPI controller:

Missing method System.Web.HttpRequest::GetBufferlessInputStream() in
assembly
/opt/mono-3.0.0/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll,
referenced in assembly
/tmp/root-temp-aspnet-0/2956977a/assembly/shadow/5cf10065/cf4140da_93b040bf_0001/System.Web.Http.WebHost.dll

This is confusing, as Mono's status page shows this method as implemented:
http://go-mono.com/status/status.aspx?reference=4.0profile=4.5assembly=System.Web.
However,
I opened Mono's System.Web.dll in a decompiler and can see that
GetBufferlessInputSteam() is missing.


On Wed, Oct 24, 2012 at 10:35 PM, Rafael Teixeira mono...@gmail.com wrote:

 Hi Daniel,

 Well at
 https://github.com/mono/mono/blob/master/mcs/class/System.Net.Http/System.Net.Http/HttpMessageInvoker.cs
  one
 can see that such class is part of Mono and stable for at least 5 months,
 so it surely should be found in Mono 3.0 but from your log it seems that
 your server is loading a copy found on your bin directory, that may be
 outdated...

 *Mono: Assembly Loader probing location:
 '/var/www/WebApiTest/bin/System.Net.Http.dll'.
 Mono: Assembly Loader shadow-copied assembly to:
 '/tmp/root-temp-aspnet-0/2956977a/assembly/shadow/ebec392e/785c7991_93b040bf_0001/System.Net.Http.dll'.
 *
 So please get rid of your copy of System.Net.Http.dll, and it should work.

 In the other hand surely IHostBufferPolicySelector is missing from
 https://github.com/mono/mono/blob/master/mcs/class/System.Web.Http/System.Web.Http.dll.sources.
 Maybe this is newer than the open sourced files from Microsoft being used
 in that part of Mono.

 Please open an issue for this second problem, probably the aspnetstack
 needs to be refreshed, although this may appear only in the 4.5 profile,
 I'm not sure what are the .NET platform requirements for ASP.NET Web API.

 Fun,

 Rafael Monoman Teixeira
 ---
 The most exciting phrase to hear in science, the one that heralds new
 discoveries, is not 'Eureka!' (I found it!) but 'That's funny ...'
 Isaac Asimov
 US science fiction novelist  scholar (1920 - 1992)



 On Wed, Oct 24, 2012 at 2:03 AM, Daniel Lo Nigro li...@dan.cx wrote:
 
  Just rediscovered the MONO_LOG_LEVEL=debug environment variable.
 Here's the log from my app: http://sprunge.us/eXOV. I think these might
 be related, but of course I could be totally wrong:
  Mono: The class System.Web.Http.Hosting.IHostBufferPolicySelector could
 not be loaded, used in System.Web.Http, Version=4.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35
  Mono: The class System.Net.Http.HttpMessageInvoker could not be loaded,
 used in System.Net.Http, Version=2.0.0.0, Culture=neutral,
 PublicKeyToken=b03f5f7f11d50a3a
 
  Thoughts?
 
 
 
  On Wed, Oct 24, 2012 at 2:23 PM, Daniel Lo Nigro li...@dan.cx wrote:
 
  I'm trying to get ASP.NET WebApi working on Mono 3.0, and am getting
  the following error:
 
  System.TypeLoadException: Could not load type
  'System.Web.Http.WebHost.HttpControllerHandler' from assembly
  'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,
  PublicKeyToken=31bf3856ad364e35'.
at (wrapper managed-to-native) System.Type:type_is_assignable_from
  (System.Type,System.Type)
at System.Type.IsAssignableFrom (System.Type c) [0x00096] in
  /usr/local/src/mono-3.0.0/mcs/class/corlib/System/Type.cs:902
at System.Web.Mvc.AreaRegistration.IsAreaRegistrationType
  (System.Type type) [0x0] in filename unknown:0
at
 System.Web.Mvc.TypeCacheUtil+c__DisplayClass1.FilterTypesInAssembliesb__0
  (System.Type type) [0x0] in filename unknown:0
at
 System.Linq.Enumerable+CreateWhereIteratorc__Iterator35`1[System.Type].MoveNext
  () [0x00059] in
 
 /usr/local/src/mono-3.0.0/mcs/class/System.Core/System.Linq/Enumerable.cs:3030
at System.Collections.Generic.List`1[System.Type].AddEnumerable
  (IEnumerable`1 enumerable) [0x00013] in
 
 /usr/local/src/mono-3.0.0/mcs/class/corlib/System.Collections.Generic/List.cs:134
at System.Collections.Generic.List`1[System.Type]..ctor
  (IEnumerable`1 collection) [0x0002f] in
 
 /usr/local/src/mono-3.0.0/mcs/class/corlib/System.Collections.Generic/List.cs:69

[Mono-dev] ASP.NET Web API on Mono 3.0 (Could not load type 'System.Web.Http.WebHost.HttpControllerHandler')

2012-10-23 Thread Daniel Lo Nigro
I'm trying to get ASP.NET WebApi working on Mono 3.0, and am getting
the following error:

System.TypeLoadException: Could not load type
'System.Web.Http.WebHost.HttpControllerHandler' from assembly
'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.
  at (wrapper managed-to-native) System.Type:type_is_assignable_from
(System.Type,System.Type)
  at System.Type.IsAssignableFrom (System.Type c) [0x00096] in
/usr/local/src/mono-3.0.0/mcs/class/corlib/System/Type.cs:902
  at System.Web.Mvc.AreaRegistration.IsAreaRegistrationType
(System.Type type) [0x0] in filename unknown:0
  at 
System.Web.Mvc.TypeCacheUtil+c__DisplayClass1.FilterTypesInAssembliesb__0
(System.Type type) [0x0] in filename unknown:0
  at 
System.Linq.Enumerable+CreateWhereIteratorc__Iterator35`1[System.Type].MoveNext
() [0x00059] in
/usr/local/src/mono-3.0.0/mcs/class/System.Core/System.Linq/Enumerable.cs:3030
  at System.Collections.Generic.List`1[System.Type].AddEnumerable
(IEnumerable`1 enumerable) [0x00013] in
/usr/local/src/mono-3.0.0/mcs/class/corlib/System.Collections.Generic/List.cs:134
  at System.Collections.Generic.List`1[System.Type]..ctor
(IEnumerable`1 collection) [0x0002f] in
/usr/local/src/mono-3.0.0/mcs/class/corlib/System.Collections.Generic/List.cs:69
  at System.Linq.Enumerable.ToList[Type] (IEnumerable`1 source)
[0x6] in 
/usr/local/src/mono-3.0.0/mcs/class/System.Core/System.Linq/Enumerable.cs:2867
  at System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies
(System.String cacheName, System.Predicate`1 predicate, IBuildManager
buildManager) [0x0] in filename unknown:0
  at System.Web.Mvc.AreaRegistration.RegisterAllAreas
(System.Web.Routing.RouteCollection routes, IBuildManager
buildManager, System.Object state) [0x0] in filename unknown:0
  at System.Web.Mvc.AreaRegistration.RegisterAllAreas (System.Object
state) [0x0] in filename unknown:0
  at System.Web.Mvc.AreaRegistration.RegisterAllAreas () [0x0] in
filename unknown:0
  at Daniel15.WebApiTest.WebApiApplication.Application_Start ()
[0x0] in filename unknown:0
  at (wrapper managed-to-native)
System.Reflection.MonoMethod:InternalInvoke
(System.Reflection.MonoMethod,object,object[],System.Exception)
  at System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x000d5] in 
/usr/local/src/mono-3.0.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:229

Followed by this error:
System.TypeLoadException:
A type load exception has occurred.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or
object): Daniel15.WebApiTest.

Are there additional debug flags I can use to determine what's causing
this and why it's unable to load the type? I'm using Mono 3.0
(compiled from source) and xsp/fastcgi-mono-server4 (latest Git
version)

Thanks in advance!
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] ASP.NET Web API on Mono 3.0 (Could not load type 'System.Web.Http.WebHost.HttpControllerHandler')

2012-10-23 Thread Daniel Lo Nigro
Just rediscovered the MONO_LOG_LEVEL=debug environment variable. Here's
the log from my app: http://sprunge.us/eXOV. I think these might be
related, but of course I could be totally wrong:
Mono: The class System.Web.Http.Hosting.IHostBufferPolicySelector could not
be loaded, used in System.Web.Http, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
Mono: The class System.Net.Http.HttpMessageInvoker could not be loaded,
used in System.Net.Http, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a

Thoughts?


On Wed, Oct 24, 2012 at 2:23 PM, Daniel Lo Nigro li...@dan.cx wrote:

 I'm trying to get ASP.NET WebApi working on Mono 3.0, and am getting
 the following error:

 System.TypeLoadException: Could not load type
 'System.Web.Http.WebHost.HttpControllerHandler' from assembly
 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,
 PublicKeyToken=31bf3856ad364e35'.
   at (wrapper managed-to-native) System.Type:type_is_assignable_from
 (System.Type,System.Type)
   at System.Type.IsAssignableFrom (System.Type c) [0x00096] in
 /usr/local/src/mono-3.0.0/mcs/class/corlib/System/Type.cs:902
   at System.Web.Mvc.AreaRegistration.IsAreaRegistrationType
 (System.Type type) [0x0] in filename unknown:0
   at
 System.Web.Mvc.TypeCacheUtil+c__DisplayClass1.FilterTypesInAssembliesb__0
 (System.Type type) [0x0] in filename unknown:0
   at
 System.Linq.Enumerable+CreateWhereIteratorc__Iterator35`1[System.Type].MoveNext
 () [0x00059] in

 /usr/local/src/mono-3.0.0/mcs/class/System.Core/System.Linq/Enumerable.cs:3030
   at System.Collections.Generic.List`1[System.Type].AddEnumerable
 (IEnumerable`1 enumerable) [0x00013] in

 /usr/local/src/mono-3.0.0/mcs/class/corlib/System.Collections.Generic/List.cs:134
   at System.Collections.Generic.List`1[System.Type]..ctor
 (IEnumerable`1 collection) [0x0002f] in

 /usr/local/src/mono-3.0.0/mcs/class/corlib/System.Collections.Generic/List.cs:69
   at System.Linq.Enumerable.ToList[Type] (IEnumerable`1 source)
 [0x6] in
 /usr/local/src/mono-3.0.0/mcs/class/System.Core/System.Linq/Enumerable.cs:2867
   at System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies
 (System.String cacheName, System.Predicate`1 predicate, IBuildManager
 buildManager) [0x0] in filename unknown:0
   at System.Web.Mvc.AreaRegistration.RegisterAllAreas
 (System.Web.Routing.RouteCollection routes, IBuildManager
 buildManager, System.Object state) [0x0] in filename unknown:0
   at System.Web.Mvc.AreaRegistration.RegisterAllAreas (System.Object
 state) [0x0] in filename unknown:0
   at System.Web.Mvc.AreaRegistration.RegisterAllAreas () [0x0] in
 filename unknown:0
   at Daniel15.WebApiTest.WebApiApplication.Application_Start ()
 [0x0] in filename unknown:0
   at (wrapper managed-to-native)
 System.Reflection.MonoMethod:InternalInvoke
 (System.Reflection.MonoMethod,object,object[],System.Exception)
   at System.Reflection.MonoMethod.Invoke (System.Object obj,
 BindingFlags invokeAttr, System.Reflection.Binder binder,
 System.Object[] parameters, System.Globalization.CultureInfo culture)
 [0x000d5] in
 /usr/local/src/mono-3.0.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:229

 Followed by this error:
 System.TypeLoadException:
 A type load exception has occurred.
 Description: HTTP 500.Error processing request.
 Details: Non-web exception. Exception origin (name of application or
 object): Daniel15.WebApiTest.

 Are there additional debug flags I can use to determine what's causing
 this and why it's unable to load the type? I'm using Mono 3.0
 (compiled from source) and xsp/fastcgi-mono-server4 (latest Git
 version)

 Thanks in advance!

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Porting an MVC2 project to MVC3 under mod_mono 2.10.1

2012-10-14 Thread Daniel Lo Nigro
 On 13/10/12 09:23, Daniel Lo Nigro wrote:
  May I ask why you're upgrading to MVC 3 instead of MVC 4? Are there some
  limitations that restrict you to use MVC 3?
 http://stackoverflow.com/questions/12550642/setting-up-mvc-4-razor-with-monodevelop/12552748#answers

So MVC 4 isn't supposed to work yet? With the exception of the OAuth
stuff, I got the basic template working with no issues. Would I
encounter issues if I tried to use it with actual web applications
(other than some simple Hello world-type apps)?
http://i.imgur.com/y5OHM.png
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Porting an MVC2 project to MVC3 under mod_mono 2.10.1

2012-10-13 Thread Daniel Lo Nigro
May I ask why you're upgrading to MVC 3 instead of MVC 4? Are there some
limitations that restrict you to use MVC 3?
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Do You (Mono developers) have some wish list?

2012-10-07 Thread Daniel Lo Nigro

 I have only one wish: i would like to see official explicit Microsoft
 no sue statement (i'm not a lawyer i don't know how to do it :-) for
 all mono related technologies (including asp.net winforms etc), this
 would strengthen mono more than anything else.


That sounds a lot like the Microsoft Community Promise:
http://en.wikipedia.org/wiki/Microsoft_Open_Specification_Promise
http://www.microsoft.com/openspecifications/en/us/programs/community-promise/faq/default.aspx
http://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list