Re: [Mono-list] IMAP?
Take a look at the Indy project (http://www.indyproject.org), they have an IMAP implementation. Although I haven't worked with IMAP, I've successfully used several indy features with Mono. Best regards, Helge Adam Tauno Williams schrieb am 12.06.2007 21:30: Anyone know of a free assembly which provides access via IMAP that works with Mono? I've googled and come up with nothing. If no, has anyone used http://www.chilkatsoft.com/email-dotnet.asp with Mono? It seems reasonably priced. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Weird crash with Remoting, native code exception
Hello guys, I am running a client-server application with a remoting server operating under mono (1.1.15 compiled from source, running on SuSE 9.1 - for the records). The client (SWF) application gets a reference to the server's CAO-remoted object and everything runs just fine. However, one server function attempts to call a method of a (Singleton) remoted object of another server (same machine, in this case). The object reference on that latter server is acquired via Activator.GetObject and this *seems* to work. (I can get the value of a remote string property). However, calling the method I intend to call crashes my (calling) server. The Singleton provider keeps running (or seems to be). Usually using mono-service together with Robert Jordan's SuSE-compatible start script, I tried to run mono-service from the console with debugging symbols and all. When it comes to the crash, I see the following output: = Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. = Stacktrace: Native stacktrace: mono(mono_handle_native_sigsegv+0x81) [0x8143c41] mono [0x8114a97] [0xe440] [0x41ff23cf] [0x41fef9de] [0x40d4c5c8] [0x40ceb551] mono [0x8131001] mono(mono_runtime_invoke+0x1b) [0x80cc97b] mono(mono_runtime_delegate_invoke+0x2d) [0x80ccc3d] mono [0x80ae9e3] mono [0x80f4804] mono [0x810b5fb] /lib/tls/libpthread.so.0 [0x400be9dd] /lib/tls/libc.so.6(__clone+0x5a) [0x401aaffa] Aborted Furthermore, this behaviour doesn't always occur. The two other chances are that it (a) just works and (b) returns with a handled exception in the calling server's code (NullReferenceException). AS I haven't found out why it does what and when, I'd appreciate hints on where to look further to track this down. I figured it could be related to: - threading? (huh, bad luck given my current threading-skillset ;-) - registering the remote object. However, in all cases, the called server's appropriate port is occupied when the program runs - mono-service related issues (my call is: mono [--debug] -l:/var/run/servicelock.pid -m:servicename -d:servicedir serviceassembly --- and seems to work fine for both programs) Many thanks for your assistance! Best regards, Helge ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Config file for dll
Hello Peter, I use that same code to read assembly settings and found it best to use the Assembly.Location property. I use the following code with both .NET and mono: string cfgFile = asm.Location + .config; const string nodeName = appSettings; Note that I also changed the node name from assemblySettings to the standard appSettings. I know this is semantically incorrect as the DLL is not the app, but it makes interchanging config files a lot easier and editing is less error-prone. Best regards, Helge Bradley, Peter schrieb am 07.02.2006 12:06: Hi, I’ve tried to post on this before, but never managed to get below the size limit. So this is a change of tactic J The problem is that I would like to keep the connection string for the application’s db connectivity in a configuration file instead of hard coding it. However, since I’m making the db connection from a dll rather than an exe file I can’t use a normal App.config file. What I would like to do is to use the AssemblySettings class that can be found at: http://www.bearcanyon.com/dotnet/#AssemblySettings This allows the settings to be accessed like this: // AssemblySettings usage: // // If you know the keys you're after, the following is probably // the most convenient: // // AssemblySettings settings = new AssemblySettings(); // string someSetting1 = settings[someKey1]; // string someSetting2 = settings[someKey2]; This works in .NET on Windows, but not in Mono on Linux. When I deploy the project to my Linux server and try to run the db connectivity code, I get an error saying that the table cannot be read. I’m certain this is because the connection string is not being read from the config file because if I hard code the connection string into the program instead of calling AssemblySettings, everything works just fine. In other words, I think the config file is not found under Mono. Looking at the AssemblySettings code, I think the problem is here: public static IDictionary GetConfig( Assembly asm ) { // Open and parse configuration file for specified // assembly, returning collection to caller for future // use outside of this class. // try { string cfgFile = asm.CodeBase + .config; const string nodeName = assemblySettings; XmlDocument doc = new XmlDocument(); doc.Load(new XmlTextReader(cfgFile)); XmlNodeList nodes = doc.GetElementsByTagName(nodeName); foreach( XmlNode node in nodes ) { if( node.LocalName == nodeName ) { DictionarySectionHandler handler = new DictionarySectionHandler(); return (IDictionary)handler.Create(null, null, node); } } } catch (Exception ex) { string s = ex.Message; } return(null); } In Windows, the variable cfgFile is set to (for example) MyAssembly.dll.config and then the XmlTextReader object reads the XML file (the config file) in the folder of the dll’s calling assembly, which would be the folder of the executable assembly that links to the dll, under normal circumstances (assuming the assembly is not in the GAC). I don’t plan to put the assembly in the GAC. Is it possible that Mono is looking in a different place? Is there some code I need to add to ensure that Mono will look in some specific place? Many thanks Peter ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Special-Signs Problem
Hello Jan, it should help to provide the appropriate client-side encoding in the connection string, like so: encoding=LATIN1;. For .NET, I found it easiest to switch to encoding=UNICODE generally as .NET string data are unicode characters anyway. Regards, Helge Jan Waiz schrieb am 19.01.2006 15:52: Hi All, maybe asked 1000 times – and answered 1000 times. But I have the Prob J Using a PostreSQL with a Database build with “LATIN1”. Accessing via NpgSql. When working from Localhost (Windows) I can put Signs like “äöü” into the PostgreSQL without Problems – reading and writing ! When doing the same running in Mono, I get “?” instead of a “ä” !? Is it a Problem with Mono? Is it a Problem with PostgreSQL? Is it a Problem in Front of the Keyboard? J Thanks in Advance ! Regards Jan Waiz ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Problem with resgen and al after updating from 1.1.8
I have upgraded from Mono 1.1.8 to 1.1.13 recently which stopped my build procedure to work. My builds are on Windows with NAnt, and I force the usage of different frameworks with the -t option. Everything works fine for net-1.1 and 2.0 while the following error occurs on mono (1.0 profile): [al] Compiling 1 files to 'chopped the path\de\dvImport.resources.dll'. [al] Unhandled Exception: System.IO.FileNotFoundException: dvImport : dvImport [al] in 0x0 unknown method [al] in (wrapper managed-to-native) System.AppDomain:LoadAssembly (string,System.Security.Policy.Evidence,bool) [al] in 0x000db System.AppDomain:Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) [al] in (wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName,System.Security.Policy.Evidence) [al] in 0x00012 System.AppDomain:Load (System.Reflection.AssemblyName assemblyRef) [al] in (wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName) [al] in 0x0001b System.Reflection.Assembly:Load (System.Reflection.AssemblyName assemblyRef) [al] in 0x001a5 Mono.AssemblyLinker.AssemblyLinker:DoIt () [al] in 0x00018 Mono.AssemblyLinker.AssemblyLinker:DynMain (System.String[] args) [al] in 0x00022 Mono.AssemblyLinker.AssemblyLinker:Main (System.String[] args) BUILD FAILED - 0 non-fatal error(s), 32 warning(s) That same error occurs if I generate the respective resource file manually with resgen and then use al to link it. The file given in the template parameter is surely there (dvImport.exe). Also, the resource file itself can be browsed with Lutz Roeder's .NET Resourcer tool and looks identical to the one generated by .NET 1.1. I appreciate any help with this problem if I have done anything wrong. Otherwise, I would file a bug, but I'm not sure as for where and what module. According to CVS, the al part hasn't changed for months. Best regards, Helge ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Interop Utility
You may want to look at SWIG: http://www.swig.org/ Regards, Helge Abe Gillespie wrote: Is there a utility out there that helps create the bindings to C library? By that I mean something that autogenerates the necessary function with [DllImport] decoration. Thanks. -Abe ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Re: Corrct trimming of email
Chris Aitken wrote: Whilst most of these replies are on list, I am getting my personal inbox filled with emails regarding an issue that I have never had. Having experienced this myself (as the sender, I admit it...), I believe this to be an issue for most non-frequent posters on this list. As a general thought, wouldn't it be better to set the list itself as the reply address? As this place is getting more and more public/known while remaining the central information source for mono (or isn't it?), changing the reply behaviour could help part-time monoers while not hurting anybody else. Regards, Helge ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Remoting and firewalls
Hello mono folks, I am writing a service that offers a remoted object on either Windows or mono/Linux. While this indeed works great on mono, my solution uses the commercial GenuineChannels product on Windows that offers a bidirectional TcpChannel implementation. This allows to get around firewalls and NAT routers but unfortunately only runs on Windows (offering lots of additional features like security sessions, impersonation, direct exchange etc. which aren't used in my case).. I'm now looking at something similar for mono, or any other solution to get connected to the server. My research so far brought up the following, most of it from a discussion on this list about two years ago: - SSH tunneling to the server might be an option. What I tried was forwarding the server port to my client machine which allowed me to connect to a singleton. Then a method is called and a CAO returned, only that the new object's URI points to the real server's name instead of localhost again. (I used this to allow for an interface-based design). - Anyway, requiring an SSH connection doesn't seem the most intuitive for the end user... Also I couldn't figure out what to do for the callback channel (I use the new TcpChannel(0) constructor for an arbitrary callback port). I'd be happy to learn about possible hints or solutions for this problem or pointers for helpful reading. Regards, Helge ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Remoting: SocketException on Windows client when server runs on Linux (certain machines)
Oh really! That was it, a wrong URI that the client couldn't ever reach. Thanks Rob for showing the way to find this out! Best regards, Helge Robert Jordan schrieb: Hi, There's basically a client/server situation with the client being a Windows application calling a server via TcpChannel on Linux/mono. The remoted singleton object has a method that returns a class that acts like a CAO. This works very well with my SuSE 9.1 based test environment. For some reason, it does not work with the server running on a freshly installed SuSE Linux Enterprise Server 9 (additionally installed pkg-config and mono-complete RPMs there). My Windows client gets the proxy instances of the remote objects, but the first call to the actual worker object fails - with a SocketException, telling me the destination host is unreachable!? Huh! The problem occur when client and server don't agree upon a common host name, for example when the server has a hostname w/out a valid DNS entry. Try to find out the URI by calling RemotingServices.GetObjectUri() on the returned object. Does it return something that your client is able to connect to? If not, your server is probably missconfigured. You may also try to apply some remoting config settings in the app.config of your server, especially bindTo and machineName. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/remotingconfig.asp Rob ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Services, daemons
Hello list, I have a core app that is usually embedded into a Windows service and, alternatively, into a console program for debugging. As the console program runs fine on mono (on SuSE 9.1, in my case), I'm looking into running it as a Linux daemon or other form of permanent, auto-starting system. For this it would be needed to replace two Windows-related mechanisms: ServiceProcess and EventLog. The logging part seems easy as I can switch to logging into a file, or look into the syslog functions. Are there any recommendations for the daemon/service part? Can I make use of ServiceProcess at all - I guess not? Is there a must-read available anywhere to clear things up? I believe this is also heavily distro-specific? Best regards, Helge ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] InvalidOperationException when using a DataAdapter's Update method (mono, npgsql)
Hello folks, I am seeing a weird InvalidOperationException being thrown when I use a (Npgsql)DataAdapter's update method in a particular setting. As I'm unsure where the error lies, I'm looking for help here before filing any bugs. Part of the problem might be that my db related stuff is coded against the generic interfaces for the sake of db engine independence. The error itself occurs on mono (1.1.7 in my case), regardless of whether used on Windows or Linux, when using Npgsql as the database provider. It does not occur on Windows with MS's framework 1.1 and Npgsql. It does also not occur on mono/MS.NET with their respective System.Data.SqlClient implementations. Now here goes... The unrelated parts of an example program are left out. The following expects a connection conn to opened to a certain database with a table table1 with an id, col1 of type varchar(50) and col2 of type integer. //Write back changes into database IDbCommand cmdUpdate = new NpgsqlCommand(UPDATE table1 SET col1=:p1, col2=:p2 WHERE id= + id.ToString()); cmdUpdate.Parameters.Add( new NpgsqlParameter(p1, NpgsqlTypes.NpgsqlDbType.Varchar, 0, col1) ); cmdUpdate.Parameters.Add( new NpgsqlParameter(p2, NpgsqlTypes.NpgsqlDbType.Integer, 0, col2) ); cmdUpdate.Connection = conn; da = new NpgsqlDataAdapter(); da.UpdateCommand = cmdUpdate; da.TableMappings.Add(Table, table1); int affectedRows = da.Update( ds ); The error that is raised on the Update command is the following: Unhandled Exception: System.InvalidOperationException: Cannot read data. No result set. in 0x0003c Npgsql.NpgsqlDataReader:CheckHaveResultSet () in 0x00028 Npgsql.NpgsqlDataReader:Read () in 0x00777 System.Data.Common.DbDataAdapter:Update (System.Data.DataRow[] dataRows, System.Data.Common.DataTableMapping tableMapping) I surely appreciate any hint to where the source of the problem can be found ;-) For the records, Windows is XP/SP2, Linux is an older SuSE 9.1 with mono compiled from source. Best regards, Helge ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] New downloads page / redcarpet / opencarpet server
Another question regarding RedCarpet/SuSE: I'm running SuSE 9.1 and have followed the steps to subscribe to the new service. It then tells me that no channels are available... which looks as if there were no packages available for this old distro. Is there a way for me to use the service (e.g. telling it that newer packages would also do their job) or do I have to upgrade my system? Helge Eric Gonia wrote: On 4/19/05, *Ben Maurer* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yum Users - You should use the following .repo file: http://www.go-mono.com/download/fedora-3-i386/mono.repo If a user does a yum update will the mono packages update properly? Do the old packages and files get removed and the new ones installed preventing any conflicts? ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] True C# vs Mono-C# Documentation?
Lennie, from my (mostly) spectator's position on this list, I felt that I needed to jump in here to say that Mono *is* True C#... :-) Depending on the nature of your application, you might or might not run into problems running your code with Mono. At the current stage of development of the framework (which is what counts here, not C# itself), you will be able get up and running quickly with existing ASP.NET web applications and server based/console applications. Problems will arise if you (a) have System.Windows.Forms dependant GUI apps and/or (b) need to call COM components or (c) need to P/Invoke with Windows platform specific functions. If you rely on a database (which is much likely MS SQL Server on Windows), you will need to convert to a DBMS that runs on Linux as well for a true conversion to that platform (e.g. MySQL, PostgreSQL). It makes more sense to compare the problem domains and technologies you are using to what mono is currently offering in its framework. Best regards, Helge Lennie De Villiers wrote: Hi, Im a newbie to Mono / Mono C#, Ive a true-C# application (true-C# being C# for Microsofts .NET framework) application containing out of thousands worth of lines of code that I must convert to running on Linux on a clients request. Since Mono-C# isnt 100% completed with equality with .NET framework, does anyone know where I can find a detail paper that compare Mono C# with True C# that list which classes have been implemented and which is outstanding? That will help me *a lot* for doing the conversion over to Mono. Thank you! Kind Regards, Lennie De Villiers ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] ODBC: Fetching a byte array from PostgreSQL
Hello, I'm having a hard time fetching a byte array from a PostgreSQL database (bytea column type) with mono/Odbc. (I know, there's Npgsql, but there would be quite a bit of code to port, so...). While it works with MS.NET, mono throws an InvalidCastException. As far as I can see, both iODBC/the psqlodbc Driver can be excluded from causing this issue. All other relevant data types work well. OdbcDataReader reports the correct System.Type (which is byte[]) for the columns in question, while filling a DataSet crashes at the Fill command. Retrieving the value through the Reader's GetValue command results in an object of type string. Is this likely to be a mono issue or do I have to look at the setup of the other components involved? Regards, Helge ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Building mono debugger
Hi folks, I'm running mono 1.01 (Red-Carpet install) on a Suse 9.1 machine and try to build release 0.9 of the mono debugger. Previous (beta) releases of the mono runtime itself compiled fine on that machine, so compiler/environment prerequisites should be fine (I guess, at least :-). Now that I run make, it says: wrapper.c: In function `debugger_class_get_static_field_data': wrapper.c:121: error: dereferencing pointer to incomplete type wrapper.c: In function `debugger_event_handler': wrapper.c:135: warning: enumeration value `MONO_DEBUGGER_EVENT_UNHANDLED_EXCEPTION' not handled in switch wrapper.c: At top level: wrapper.c:139: warning: initialization from incompatible pointer type wrapper.c: In function `mono_debugger_main': wrapper.c:226: error: dereferencing pointer to incomplete type wrapper.c:226: error: dereferencing pointer to incomplete type make[2]: *** [wrapper.o] Error 1 make[2]: Leaving directory `/root/mono-debugger-0.9/wrapper' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/mono-debugger-0.9' make: *** [all] Error 2 I have no clue at this point - and appreciate any help. Thanks, Helge ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Building mono debugger
Thanks Jacek, I have found the patch you mentioned and managed to compile the debugger. However, I may simply not be clever enough to make use of it. In my first naive attempt, I located mdb.exe and started it with my exe as a parameter. Here are the first lines of the output: Mono Debugger EXCEPTION: Mono.Debugger.SymbolTableException: `MONO_DEBUGGER__debugger_info' has version 43, but expected 41. Again, for me to continue the adventure, I appreciate any hint, how-to or other help. In the meantime, I will stick with lots of Console.WriteLine()s for debugging :-) Regards, Helge Jacek Blaszczynski wrote: Hi! There is a patch available in mono-list or mono-develop-list in July posts - I do not remember who has posted it but subject contained word debugger. cheers Jacek -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helge Lenuweit Sent: Thursday, August 12, 2004 12:04 PM To: mono-List (E-mail) Subject: [Mono-list] Building mono debugger Hi folks, I'm running mono 1.01 (Red-Carpet install) on a Suse 9.1 machine and try to build release 0.9 of the mono debugger. Previous (beta) releases of the mono runtime itself compiled fine on that machine, so compiler/environment prerequisites should be fine (I guess, at least :-). Now that I run make, it says: wrapper.c: In function `debugger_class_get_static_field_data': wrapper.c:121: error: dereferencing pointer to incomplete type wrapper.c: In function `debugger_event_handler': wrapper.c:135: warning: enumeration value `MONO_DEBUGGER_EVENT_UNHANDLED_EXCEPTION' not handled in switch wrapper.c: At top level: wrapper.c:139: warning: initialization from incompatible pointer type wrapper.c: In function `mono_debugger_main': wrapper.c:226: error: dereferencing pointer to incomplete type wrapper.c:226: error: dereferencing pointer to incomplete type make[2]: *** [wrapper.o] Error 1 make[2]: Leaving directory `/root/mono-debugger-0.9/wrapper' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/mono-debugger-0.9' make: *** [all] Error 2 I have no clue at this point - and appreciate any help. Thanks, Helge ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list