[Mono-aspnet-list] XSP-Webserver crashes on executing ASP.NET application

2012-08-20 Thread Ferdinand Funke
Hi guys, I have a really strange problem with my ASP.NET application. I created it for Mono and .NET and developed it in Visual Studio.  But as I recently started a Mono test run I recognized that my XSP server crashes somehow. This does not happen periodicly. Most of the time I can log in and

Re: [Mono-list] Questions about coding style

2012-08-20 Thread Jonathan Pryor
On Aug 17, 2012, at 5:49 PM, Philippe Grohrock philippe.grohr...@gmail.com wrote: 1. Is it bad/good style to have a public class that implements global variables? How do you define global variable? :-) `public static` fields are Very Bad™, unless they're `readonly`. This is because there's

Re: [Mono-list] Questions about coding style

2012-08-20 Thread Philippe Grohrock
Thanks for the reply already and I'm sorry, I should've added the lines of code. This way the whole program has access to it and can modify/query the DB when needed (this is what I meant with global). At the moment I have 2 of my windows using that connection, but there might be more in the

Re: [Mono-list] Questions about coding style

2012-08-20 Thread James Wright
I'd create ConnectionFactory class, although feel free to ignore me, just thinking off the top of my head! :-) public class ConnectionFactory { private static MySqlConnection _connection; public MySqlConnection GetConnection() { if (_connection == null) {

Re: [Mono-list] Questions about coding style

2012-08-20 Thread IBBoard
Just in case no-one else spots it, you'll need a static keyword on that GetConnection() declaration, otherwise you have to create an instance to get a reference to the private static variable, which is just odd :) On 20/08/12 20:45, James Wright wrote: I'd create ConnectionFactory

Re: [Mono-list] Questions about coding style

2012-08-20 Thread Gabriel Ibanez
Be carefull about this way of working with DB. You must free the connections as fast as you can and I'm not sure you can do like this way. What happen if you dispose the connection ? That would be the usual way of freeing the queue (or thru the 'using' blocks). /Gabriel -Original

Re: [Mono-list] Questions about coding style

2012-08-20 Thread Philippe Grohrock
Be carefull about this way of working with DB. You must free the connections as fast as you can and I'm not sure you can do like this way. Basically the connection gets initialised when the application starts and every time I need a query, the connection gets opened, queried, closed, but not

Re: [Mono-list] Questions about coding style

2012-08-20 Thread James Wright
Unless I'm mistaken .NET connections are pooled for you, so I don't think you'll be gaining much from keeping one instance of the connection always open as the framework is already doing just that. My advice is don't worry about it until you have to... chances are it won't be a problem in

Re: [Mono-list] Questions about coding style

2012-08-20 Thread Philippe Grohrock
Unless I'm mistaken .NET connections are pooled for you, so I don't think you'll be gaining much from keeping one instance of the connection always open as the framework is already doing just that. My advice is don't worry about it until you have to... chances are it won't be a problem in

[Mono-list] monotools server centos/rhel

2012-08-20 Thread edward . harvey . mono
On mono-tools.com, they have download links for 1ClickInstall (openSuse), or the monotools source tarball. I'm trying to install on centos 6, specifically so I can remote debug something. I haven't had any luck building from source, or trying to install the 1click. Anybody have any