Bug 197 - WCF and SecurityMode.TransportWithMessageCredential;
Summary: WCF and SecurityMode.TransportWithMessageCredential;
Status: IN_PROGRESS
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: unspecified
Hardware: All Linux
: Normal critical
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-08-05 08:13 UTC by Antya Dev
Modified: 2017-05-09 18:18 UTC (History)
7 users (show)

See Also:
Tags: WCF; NetTcpBinding; SecurityMode.TransportWithMessageCredential;
Is this bug a regression?: ---
Last known good build:


Attachments
source code for example (12.64 KB, application/octet-stream)
2011-08-05 08:13 UTC, Antya Dev
Details
source code (12.86 KB, application/zip)
2011-08-09 05:42 UTC, Antya Dev
Details

Description Antya Dev 2011-08-05 08:13:41 UTC
Created attachment 73 [details]
source code for example

Description of Problem:

I have critical problem with WCF secure mode connection on client (used mono 2.10.3). When I try connect to server (server runtime is .NET) without any secure mode then it's working fine for me but for this my server also not used authentification.

So, when I added to server and client some code for authentificate, for example:

NetTcpBinding binding = new NetTcpBinding(SecurityMode.TransportWithMessageCredential);
binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Certificate;

serviceHost.Credentials.ServiceCertificate.SetCertificate(
                    StoreLocation.LocalMachine,
                    StoreName.My,
                    X509FindType.FindBySerialNumber,
                    Properties.Settings.Default.appCertSerialNumber);

                serviceHost.Credentials.UserNameAuthentication.UserNamePasswordValidationMode =
                    System.ServiceModel.Security.UserNamePasswordValidationMode.Custom;

                serviceHost.Credentials.UserNameAuthentication.CustomUserNamePasswordValidator =
                    new Platezhka.Common.AuthorizationManager.CustomUserNamePasswordValidator(Properties.Settings.Default.platezhkadbConnectionString,
                        Platezhka.Common.AuthorizationManager.CustomUserNamePasswordValidator.PasswordType.UserPasswordServiceMenu);

                serviceHost.Authorization.ServiceAuthorizationManager =
                    new Platezhka.Common.AuthorizationManager.CustomServiceAuthorizationManager(Properties.Settings.Default.platezhkadbConnectionString);


Then it's stoped work, becouse my client always crashed. 

Please Attention: When I tried switch a runtime on client from Mono to .NET then it's became working fine. On Mono I always see an exception message about System.IO.Exception. 



Steps to reproduce the problem:
1. Open attachment archive. Next, start WcfMonoServer on .NET 3.5 on Windows 7 or other Windows.
2. Open WcfTcpClient. Start it on Mono 2.10.3 and try open connect.


Actual Results:
Always crash with System.IO.Exception

Expected Results:
Must work as on .NET3.5

Regards.
Comment 1 Miguel de Icaza [MSFT] 2011-08-05 17:23:47 UTC
Please attach sample as a ZIP file.

Also, be warned that WCF support is partial, and only considered alpha-level, since there are many pieces not completed.
Comment 2 Antya Dev 2011-08-09 05:42:43 UTC
Created attachment 93 [details]
source code
Comment 3 Antya Dev 2011-08-09 05:52:58 UTC
Of course, I understand that WCF support is partial.

I already added attach sample as a ZIP file.

I noticed one detail:
  if insert the SecurityMode to not in "None" it's always throw exception.

Regards.
Comment 4 christophe 2017-05-09 18:18:32 UTC
Hi,

Any update on this issue since 6 years now ???
This problem still exists even though the status is in progress.

I believe nobody works on this issue. 
Please advise.

Can't wait anymore.

Note You need to log in before you can comment on or make changes to this bug.