[Mono-list] WCF certificate security with Mono

2011-07-22 Thread Michael Stoll

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  ChannelFactory(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


Re: [Mono-list] Problem with MySQL connection using ProviderFactory

2011-07-22 Thread Danny
You can add this to your app.config file using the  element and it 
will get appended to the system's default set.  An example from my 
system that uses Firebird...

   
 
   
 
   

The  element is a child of .

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 ...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] > 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  looks like?
> Check the casing of the provider name, assembly name etc.
>
> Robert
>
> ___
> Mono-list maillist  - [hidden email]
> 
> 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
> 
> 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 maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with MySQL connection using ProviderFactory

2011-07-22 Thread Danny
You can add this to your app.config file using the  element and it 
will get appended to the system's default set.  An example from my 
system that uses Firebird...

   
 
   
 
   

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 ...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] > 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  looks like?
> Check the casing of the provider name, assembly name etc.
>
> Robert
>
> ___
> Mono-list maillist  - [hidden email]
> 
> 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
> 
> 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 maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] WCF Hosting Problem

2011-07-22 Thread Atsushi Eno
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 
> 
> 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 maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with MySQL connection using ProviderFactory

2011-07-22 Thread Vinod
I am sorry if this sounds noobish (I am a noob as far as mono goes btw!),
but where do I find ...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  looks like?
> Check the casing of the provider name, assembly name etc.
>
> Robert
>
> ___
> Mono-list maillist  -  [hidden 
> email]
> 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: 
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] Problem with MySQL connection using ProviderFactory

2011-07-22 Thread Robert Jordan
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  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

2011-07-22 Thread Vinod
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

2011-07-22 Thread Robert Jordan
On 22.07.2011 12:16, Vinod wrote:
> 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*

Check the casing of "MySql.Data.dll" on disk.

The connector is notoriously distributed with this assembly
called "mysql.data.dll". Don't ask why.

Robert


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


[Mono-list] Problem with MySQL connection using ProviderFactory

2011-07-22 Thread Vinod
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] WCF Hosting Problem

2011-07-22 Thread Vinod
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


Re: [Mono-list] Mono - mkbundle

2011-07-22 Thread Robert Jordan
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] Mono - mkbundle

2011-07-22 Thread Uli Hertlein
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] Do you need to have Mono installed before you can build it?

2011-07-22 Thread Abe Gillespie
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  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