Re: [Mono-dev] Mixed Mode Assemblies
On 22.07.2011 00:56, Ivo Smits wrote: Also, I think that eventually the 'reverse interop code' could be generated from an assembly file by using the Reflection framework. You could make the code generator a managed application. This is kinda obvious :) The same in C++ would be taking like 10 times more effort. Tom was rather focused on the unmanaged part in his PoC. To be really useful, the generator must perform much more than dumb stub generation. It must generate C++ classes, take care of object pinning and unpinning, wrapping and unwrapping C++ objects to/from Mono objects on managed/unmanaged boundaries, struct handling, fields, constants, delegates, exception handling, etc. On the other hand, this is actually the duty of a C++ compiler that claims to support managed extensions. So the next natural step would be to check what others have already done it this area. And... I have no idea where to start looking :) This is written from memory: There is a gcc C++/CIL, but it's of no use in our context because it's got a CIL backend. I don't know if it supports the managed C++ extensions syntax at all. There is a (GSoC?) project focused on COM-like interop. I don't know it they have something like a generator for C++ stubs. If yes, it would be an IDL-approach, tailored for COM. There is an interesting (GSoC?) project (maybe the same as above?) focused on invoking those highly mangled C++ symbols from unmanaged C++ libraries. This is rather the inverse of what we've discussed so far in this thread, but it's something worth looking at. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Segfault in JIT - How to fix?
Hi, I tried to make a patch that fixes the problem - see attached file. My example code now works without problems. I also attached the patch to novell-mono-bugzilla, but I'm not really sure if that's the right place. Bye Mirko Von: Rodrigo Kumpera [mailto:kump...@gmail.com] Gesendet: Donnerstag, 21. Juli 2011 16:05 An: Mirko Wischer Cc: mono-devel-list@lists.ximian.com Betreff: Re: [Mono-dev] Segfault in JIT - How to fix? On Wed, Jul 13, 2011 at 6:51 AM, Mirko Wischer mirko.wisc...@sma.de wrote: What would be the preferred way of fixing this? The code on soft-float decomposition should handle this case. ___ SMA Solar Technology AG Aufsichtsrat: Guenther Cramer (Vorsitzender) Vorstand: Juergen Dolle, Roland Grebe, Uwe Hertel, Pierre-Pascal Urbon, Marko Werner Handelsregister: Amtsgericht Kassel HRB 3972 Sitz der Gesellschaft: 34266 Niestetal USt-ID-Nr. DE 113 08 59 54 WEEE-Reg.-Nr. DE 95881150 ___ decompose_possible_fix.patch Description: decompose_possible_fix.patch ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Non-TCP/IP socket access
I have a project that needs access to Linux Bluetooth sockets from Mono. Miguel previously suggested that I would have to manually P/Invoke to socket (and connect, bind, getpeername, etc) and use Reflection to set the fd value returned by the socket call into the socket field in the Socket class. I've implemented that but I get a ENOTSOCK on any access to Socket's methods/properties. For example: System.Net.Sockets.SocketException: The descriptor is not a socket at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x000af] in /usr/src/packages/BUILD/mono-2.8/mcs/class/System/System.Net.Sockets/Socket.cs:2410 ... Which is presumably due to the following (_wapi_recvfrom in sockets.c). if (_wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) { WSASetLastError (WSAENOTSOCK); return(SOCKET_ERROR); } Presumably I can't convert my fd to a wapi handle somehow... So is that plan not going to work? :-,( Thanks Andy ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Non-TCP/IP socket access
On 22.07.2011 13:08, Andy Hume wrote: Presumably I can't convert my fd to a wapi handle somehow... So is that plan not going to work? :-,( It won't work. The whole socket machinery assumes type AF_UNIX or AF_INET. If you set a fd of some other address family type, a lot of nasty things could happen if this check wasn't there. Get/SetSocketOptions, Local/RemoteEndPoint etc. simply don't cope with other AF types. They would return garbage at best. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Non-TCP/IP socket access
From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Robert Jordan Sent: 22 July 2011 12:43 To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Non-TCP/IP socket access On 22.07.2011 13:08, Andy Hume wrote: Presumably I can't convert my fd to a wapi handle somehow... So is that plan not going to work? :-,( It won't work. The whole socket machinery assumes type AF_UNIX or AF_INET. If you set a fd of some other address family type, a lot of nasty things could happen if this check wasn't there. Get/SetSocketOptions, Local/RemoteEndPoint etc. simply don't cope with other AF types. They would return garbage at best. I actually don't need to call any of those functions -- and if I were I could just P/Invoke them...[1] :-,( The bit I obviously don't want to have to write myself is anything to do with I/O. That's a huge amount of difficult work and its all there and working in Mono and would work for my (SOCK_STREAM) socket if I could just create the socket somehow. :-,( All I need is that wapi handle...[2] Do we think it's impossible to access it. Andy __Footnotes [1] Actually, since https://github.com/mono/mono/commit/4ca63a4b2ac7dfd24f2ba7311afe6c83e4b1 ced0 the restriction on the types of sockaddr/EndPoint has beem removed in the managed code. Now the Prototype Pattern is used to allow the managed code to return arbitrary sub-types of EndPoint class. In get_LocalEndPoint/RemoteEndPoint/etc(?) the EndPoint previously used by the caller for Bind/Connect is used as the prototype to convert the byte array returned from the call to getpeername etc, e.g. return seed_endpoint.Create (sa); So the restriction in the runtime could be removed too. That's what the behaviour is on MSFT (both desktop and NETCF). I have working Bluetooth and IrDA sockets there. So it's a shame they're blocked on Mono. But that's perhaps for a later discussion... [2] Or for sockets on Mono _not_ to block access for a different family values. And then I could use the I/O functions at least([1]). ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Non-TCP/IP socket access
On 22.07.2011 15:00, Andy Hume wrote: From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Robert Jordan Sent: 22 July 2011 12:43 To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Non-TCP/IP socket access On 22.07.2011 13:08, Andy Hume wrote: Presumably I can't convert my fd to a wapi handle somehow... So is that plan not going to work? :-,( It won't work. The whole socket machinery assumes type AF_UNIX or AF_INET. If you set a fd of some other address family type, a lot of nasty things could happen if this check wasn't there. Get/SetSocketOptions, Local/RemoteEndPoint etc. simply don't cope with other AF types. They would return garbage at best. I actually don't need to call any of those functions -- and if I were I could just P/Invoke them...[1] :-,( The bit I obviously don't want to have to write myself is anything to do with I/O. That's a huge amount of difficult work and its all there and working in Mono and would work for my (SOCK_STREAM) socket if I could just create the socket somehow. :-,( All I need is that wapi handle...[2] Do we think it's impossible to access it. It looks like you could be able to create the socket with io-layers's function: [DllImport(__Internal)] static extern int _wapi_socket(int domain, int type, int protocol, IntPtr unused1, int unused2, int unused3); Then assign the returned descriptor via reflection. I'll be shot for this one day ;) Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Non-TCP/IP socket access
On 22.07.2011 15:40, Robert Jordan wrote: On 22.07.2011 15:00, Andy Hume wrote: From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Robert Jordan Sent: 22 July 2011 12:43 To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Non-TCP/IP socket access On 22.07.2011 13:08, Andy Hume wrote: Presumably I can't convert my fd to a wapi handle somehow... So is that plan not going to work? :-,( It won't work. The whole socket machinery assumes type AF_UNIX or AF_INET. If you set a fd of some other address family type, a lot of nasty things could happen if this check wasn't there. Get/SetSocketOptions, Local/RemoteEndPoint etc. simply don't cope with other AF types. They would return garbage at best. I actually don't need to call any of those functions -- and if I were I could just P/Invoke them...[1] :-,( The bit I obviously don't want to have to write myself is anything to do with I/O. That's a huge amount of difficult work and its all there and working in Mono and would work for my (SOCK_STREAM) socket if I could just create the socket somehow. :-,( All I need is that wapi handle...[2] Do we think it's impossible to access it. It looks like you could be able to create the socket with io-layers's function: [DllImport(__Internal)] static extern int _wapi_socket(int domain, int type, int protocol, IntPtr unused1, int unused2, int unused3); Thank God this doesn't work because _wapi_* symbols are marked as private. But there is another way: 1) create an INET socket with Mono's System.Net.Sockets.Socket class 2) get its FD via reflection 3) close it via p/invoke with close(2) (see man 2 close) 4) create your socket via p/invoke with socket(2) 5) don't close the socket create in (4) yourself, because WAPI will take care of it. 6) use the socket created in (1) throughout your application Because Unix is reusing descriptors, the socket created in (4) will have the same number, and WAPI will be happy. Put this code inside a lock to prevent that some other thread is stealing your fd. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Segfault in JIT - How to fix?
On Fri, Jul 22, 2011 at 7:51 AM, Mirko Wischer mirko.wisc...@sma.de wrote: Hi, I tried to make a patch that fixes the problem - see attached file. My example code now works without problems. I also attached the patch to novell-mono-bugzilla, but I'm not really sure if that's the right place. Bye Mirko You don't need the second check. The assert is there to make sure we have everything in sync. I believe a nicer fix would be to do something like if (!ins-next) { ins-next = OP_NOP; break; } only as it would reduce the diff size and nesting levels. The best way to get the fix in is to fork mono from github and make a pull request. Reference the bug number on it and we'll take care of the rest. Thanks a lot for working on this. Rodrigo ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Non-TCP/IP socket access
-Original Message- From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Robert Jordan Sent: 22 July 2011 14:41 To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Non-TCP/IP socket access On 22.07.2011 15:00, Andy Hume wrote: From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list-boun...@lists.ximian.com] On Behalf Of Robert Jordan Sent: 22 July 2011 12:43 To: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Non-TCP/IP socket access On 22.07.2011 13:08, Andy Hume wrote: Presumably I can't convert my fd to a wapi handle somehow... So is that plan not going to work? :-,( [...] All I need is that wapi handle...[2] Do we think it's impossible to access it. It looks like you could be able to create the socket with io-layers's function: [DllImport(__Internal)] static extern int _wapi_socket(int domain, int type, int protocol, IntPtr unused1, int unused2, int unused3); Then assign the returned descriptor via reflection. I'll be shot for this one day ;) That was the most beautiful ugly thing I've seen in a long time. :-) Unfortunately I haven't managed to get it to work: 1) Try [DllImport(__Internal)] extern int _wapi_socket(..) Swallowed Exception: System.EntryPointNotFoundException: _wapi_socket 2) Try [DllImport(mono-2.0)] extern int _wapi_socket(..) Swallowed Exception: System.EntryPointNotFoundException: _wapi_socket Even with some nm-ing I'm not sure where it is exported... Ohh so close... Andy ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Non-TCP/IP socket access
Op 22-7-2011 17:05, Andy Hume schreef: That was the most beautiful ugly thing I've seen in a long time. :-) Unfortunately I haven't managed to get it to work: 1) Try [DllImport(__Internal)] extern int _wapi_socket(..) Swallowed Exception: System.EntryPointNotFoundException: _wapi_socket 2) Try [DllImport(mono-2.0)] extern int _wapi_socket(..) Swallowed Exception: System.EntryPointNotFoundException: _wapi_socket If I remember correctly, the class name including it's namespace may need to be the same. I have used a similar 'hack' with the file I/O to create an unbuffered stream I/O wrapper. I've used the [MethodImplAttribute(MethodImplOptions.InternalCall)] attribute there; just copy-pasted from the Mono sourcecode. Also, shouldn't the return value be an IntPtr rather than an int? However, looking at the mono code, there are no checks in the managed part of the Socket construction. Did I miss anything, is it in the unmanaged code perhaps? Have you tried to use the managed Socket constructor, and optionally cast an integer value to the AddressFamily/ProtocolType? You could then retrieve the socket handle and make the bind/connect calls. -- Ivo ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Invitation to Unite11
Hi, Every year Unity has a conference where we bring together employees, customers and friends, for a multiday learning, laughing and dancing event. This year it is held in San Francisco, September 28-29-30. This is an invitation for every contributor to the mono project to attend the conference. I hope some of you will be able to make it. If you want to come, please let me know beforehand, so I can put you on the guestlist. for more info: http://www.unity3d.com/unite Hope to see you there, Lucas ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] How do I take a screenshot?
Plain and simple. I would like to be able to take a screen shot which I can then place inside a picturebox. The closest I have come to is this: http://stackoverflow.com/questions/5243021/how-to-take-screenshot-from-panel-in-mono-c Link This would work, but it doesn't resize, and it is really slow to do it. Is there a better way? -- View this message in context: http://mono.1490590.n4.nabble.com/How-do-I-take-a-screenshot-tp3688204p3688204.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
Re: [Mono-list] Do you need to have Mono installed before you can build it?
I'm getting the error: make[6]: Entering directory `/home/mike/mono/mcs' make[6]: gmcs: Command not found make[6]: *** [build/deps/basic-profile-check.exe] Error 127 make[6]: Leaving directory `/home/mike/mono/mcs' *** The compiler 'gmcs' doesn't appear to be usable. *** You need Mono version 2.4 or better installed to build MCS *** Read INSTALL.txt for information on how to bootstrap a Mono installation. make[5]: *** [do-profile-check] Error 1 The docs at: http://mono-project.com/Compiling_Mono_From_Git#Checking_out_for_the_first_time Seem to hint I need the Mono compiler installed before I can build Mono.. What's the most straight forward way to do this on OpenSuSE 11.4? I do have gmsc.exe on another machine (version 2.6) - Can I just copy that somewhere and set EXTERNAL_MCS? Thanks! Ok I tried the make get-monolite-latest thing, and it seems to have built and the unit tests are passing.. haven't done a make install yet.. Is there a reason why the build script can't just build gmcs and then run it? I assume if this were easy it would work that way already though :) Mike ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Do you need to have Mono installed before you can build it?
The C# compilers are written in C#. So, yeah, you've got to have *something* on your system that can compile C#. That can either be a previous Mono installation or the mono-lite package as you've found out. Sent from phone. Please excuse brevity and mistakes. On Jul 22, 2011, at 2:29, Mike Christensen m...@kitchenpc.com wrote: I'm getting the error: make[6]: Entering directory `/home/mike/mono/mcs' make[6]: gmcs: Command not found make[6]: *** [build/deps/basic-profile-check.exe] Error 127 make[6]: Leaving directory `/home/mike/mono/mcs' *** The compiler 'gmcs' doesn't appear to be usable. *** You need Mono version 2.4 or better installed to build MCS *** Read INSTALL.txt for information on how to bootstrap a Mono installation. make[5]: *** [do-profile-check] Error 1 The docs at: http://mono-project.com/Compiling_Mono_From_Git#Checking_out_for_the_first_time Seem to hint I need the Mono compiler installed before I can build Mono.. What's the most straight forward way to do this on OpenSuSE 11.4? I do have gmsc.exe on another machine (version 2.6) - Can I just copy that somewhere and set EXTERNAL_MCS? Thanks! Ok I tried the make get-monolite-latest thing, and it seems to have built and the unit tests are passing.. haven't done a make install yet.. Is there a reason why the build script can't just build gmcs and then run it? I assume if this were easy it would work that way already though :) Mike ___ 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] Mono - mkbundle
On 07/22/2011 04:20 AM, TDain wrote: Thanks for your reply. Sorry I don't understand though. I did not build using a non-default prefix, I've rebuilt again to check any warnings, and there were none emitted about this. Any other ideas? Did you check that the location (/usr/local?) where Mono is installed to is in your LD_LIBRARY_PATH? I'm just asking because I got the exact same message (System.DllNotFoundException: libMonoPosixHelper.so) when I installed Mono. Cheers, /uli -- Ulrich Hertlein Research and Development mailto:u...@xdt.com.au XDT Pty Ltdhttp://www.xdt.com.au ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Mono - mkbundle
On 22.07.2011 04:20, TDain wrote: Thanks for your reply. Sorry I don't understand though. I did not build using a non-default prefix, I've rebuilt again to check any warnings, and there were none emitted about this. Any other ideas? Well, /usr/local might be a non-default prefix in your distribution. You must set LD_LIBRARY_PATH or add /usr/local/lib to the system's library path (/etc/ld.so.conf). Robert ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] WCF Hosting Problem
I just can't get this to work. I tried self hosting, it seems to work at least a hello world service. Let me see if I can get my custom services to work that way. Apache hosting would have been really great though :-(. -Vinod -- View this message in context: http://mono.1490590.n4.nabble.com/WCF-Hosting-Problem-tp3682894p3686376.html Sent from the Mono - General mailing list archive at Nabble.com.___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
[Mono-list] Problem with MySQL connection using ProviderFactory
Guys, I have got another problem :-( I am trying to port my provider independent DAL to Mono. It compiles fine. But when I try to execute the code I get the following error: /*Failed to find or load the registered .Net framework data provider Mysql.Data.Mysqlclient*/ My connection string: *server=localhost;User Id=root;Password=pass;Persist Security Info=True;database=mydb* I have given provider as : *MySql.Data.MySqlClient* I have downloaded the mono connector from http://dev.mysql.com/downloads/connector/net/#downloads here and followed the guide from http://dev.mysql.com/doc/refman/5.1/en/connector-net-installation-unix.html here to install the Mysql dll into the gac. I used the dll from the v4 directory. Can someone tell me what mistake I am doing? -Vinod -- View this message in context: http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3686395.html Sent from the Mono - General mailing list archive at Nabble.com.___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Problem with MySQL connection using ProviderFactory
well I did notice the casing. I corrected it in the code too. I get the error message now in small letters -___- that's all that changed. It must be something else. -Vinod -- View this message in context: http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3686430.html Sent from the Mono - General mailing list archive at Nabble.com. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Problem with MySQL connection using ProviderFactory
On 22.07.2011 12:45, Vinod wrote: well I did notice the casing. I corrected it in the code too. I get the error message now in small letters -___- Maybe I was too sloppy in my post. The assembly file name *must* be MySql.Data.dll. How does your system.dataDbDbProviderFactories looks like? Check the casing of the provider name, assembly name etc. Robert ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Problem with MySQL connection using ProviderFactory
I am sorry if this sounds noobish (I am a noob as far as mono goes btw!), but where do I find system.dataDbDbProviderFactories...In windows it's machine.config. where is it located in Linux (Open SUSE 11.3 to be specific). Thanks for your replies. -Vinod On Fri, Jul 22, 2011 at 4:50 PM, Robert Jordan [via Mono] ml-node+3686475-1873788743-254...@n4.nabble.com wrote: On 22.07.2011 12:45, Vinod wrote: well I did notice the casing. I corrected it in the code too. I get the error message now in small letters -___- Maybe I was too sloppy in my post. The assembly file name *must* be MySql.Data.dll. How does your system.dataDbDbProviderFactories looks like? Check the casing of the provider name, assembly name etc. Robert ___ Mono-list maillist - [hidden email]http://user/SendEmail.jtp?type=nodenode=3686475i=0 http://lists.ximian.com/mailman/listinfo/mono-list -- If you reply to this email, your message will be added to the discussion below: http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3686475.html To unsubscribe from Problem with MySQL connection using ProviderFactory, click herehttp://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3686395code=YmFsaWdhdmlub2RAZ21haWwuY29tfDM2ODYzOTV8LTE5MTEzNDE0MjM=. -- View this message in context: http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3687122.html Sent from the Mono - General mailing list archive at Nabble.com.___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] WCF Hosting Problem
It is hard for me to parse your message. Do you mean, you could run *my* sample but couldn't get your case that you didn't give us wsdls and hence left unfixed? Atsushi Eno I just can't get this to work. I tried self hosting, it seems to work at least a hello world service. Let me see if I can get my custom services to work that way. Apache hosting would have been really great though :-(. -Vinod View this message in context: Re: WCF Hosting Problem http://mono.1490590.n4.nabble.com/WCF-Hosting-Problem-tp3682894p3686376.html Sent from the Mono - General mailing list archive http://mono.1490590.n4.nabble.com/Mono-General-f1490591.html at Nabble.com. ___ 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] Problem with MySQL connection using ProviderFactory
You can add this to your app.config file using the add/ element and it will get appended to the system's default set. An example from my system that uses Firebird... system.data DbProviderFactories add name=FirebirdClient Data Provider invariant=FirebirdSql.Data.FirebirdClient description=.Net Framework Data Provider for Firebird type=FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.5.1.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c / /DbProviderFactories /system.data Regards, Danny On 07/22/2011 12:16 PM, Vinod wrote: I am sorry if this sounds noobish (I am a noob as far as mono goes btw!), but where do I find system.dataDbDbProviderFactories...In windows it's machine.config. where is it located in Linux (Open SUSE 11.3 to be specific). Thanks for your replies. -Vinod On Fri, Jul 22, 2011 at 4:50 PM, Robert Jordan [via Mono] [hidden email] /user/SendEmail.jtp?type=nodenode=3687122i=0 wrote: On 22.07.2011 12:45, Vinod wrote: well I did notice the casing. I corrected it in the code too. I get the error message now in small letters -___- Maybe I was too sloppy in my post. The assembly file name *must* be MySql.Data.dll. How does your system.dataDbDbProviderFactories looks like? Check the casing of the provider name, assembly name etc. Robert ___ Mono-list maillist - [hidden email] http://user/SendEmail.jtp?type=nodenode=3686475i=0 http://lists.ximian.com/mailman/listinfo/mono-list If you reply to this email, your message will be added to the discussion below: http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3686475.html To unsubscribe from Problem with MySQL connection using ProviderFactory, click here. View this message in context: Re: Problem with MySQL connection using ProviderFactory http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3687122.html Sent from the Mono - General mailing list archive http://mono.1490590.n4.nabble.com/Mono-General-f1490591.html at Nabble.com. ___ 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] Problem with MySQL connection using ProviderFactory
You can add this to your app.config file using the add/ element and it will get appended to the system's default set. An example from my system that uses Firebird... system.data DbProviderFactories add name=FirebirdClient Data Provider invariant=FirebirdSql.Data.FirebirdClient description=.Net Framework Data Provider for Firebird type=FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.5.1.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c / /DbProviderFactories /system.data The system.data element is a child of configuration. Regards, Danny On 07/22/2011 12:16 PM, Vinod wrote: I am sorry if this sounds noobish (I am a noob as far as mono goes btw!), but where do I find system.dataDbDbProviderFactories...In windows it's machine.config. where is it located in Linux (Open SUSE 11.3 to be specific). Thanks for your replies. -Vinod On Fri, Jul 22, 2011 at 4:50 PM, Robert Jordan [via Mono] [hidden email] /user/SendEmail.jtp?type=nodenode=3687122i=0 wrote: On 22.07.2011 12:45, Vinod wrote: well I did notice the casing. I corrected it in the code too. I get the error message now in small letters -___- Maybe I was too sloppy in my post. The assembly file name *must* be MySql.Data.dll. How does your system.dataDbDbProviderFactories looks like? Check the casing of the provider name, assembly name etc. Robert ___ Mono-list maillist - [hidden email] http://user/SendEmail.jtp?type=nodenode=3686475i=0 http://lists.ximian.com/mailman/listinfo/mono-list If you reply to this email, your message will be added to the discussion below: http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3686475.html To unsubscribe from Problem with MySQL connection using ProviderFactory, click here. View this message in context: Re: Problem with MySQL connection using ProviderFactory http://mono.1490590.n4.nabble.com/Problem-with-MySQL-connection-using-ProviderFactory-tp3686395p3687122.html Sent from the Mono - General mailing list archive http://mono.1490590.n4.nabble.com/Mono-General-f1490591.html at Nabble.com. ___ 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] WCF certificate security with Mono
I'm trying to migrate an existing application to Mono (v2.10.2). Therefore I created a test WCF service with BasicHttpBinding and message security. The client works perfectly with .NET, but when running with Mono it fails. The client factory is instantiated as follows: | var certificate= new X509Certificate2(certificate.pfx, password); var binding= new BasicHttpBinding(); binding.Security.Mode = BasicHttpSecurityMode.Message; binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.Certificate; var epa= new EndpointAddress( new Uri(http://localhost:53076/Service1.svc;), new X509CertificateEndpointIdentity(certificate)); var factory= new ChannelFactoryIService1(binding, epa); factory.Credentials.ServiceCertificate.DefaultCertificate = certificate; factory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None; factory.Credentials.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck; factory.Credentials.ClientCertificate.Certificate = certificate; var client= factory.CreateChannel(); | In Mono the application fails within CreateChannel throwing the exception: System.InvalidOperationException: The binding does not support any of the channel types that the contract 'IService1' allows. I debugged into the Mono source code and found out that the problem is that AsymmetricSecurityBindingElement.InitiatorTokenParameter == null. I'm new to Mono, maybe you could point me to a documentation/tutorial which covers this topic. ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list