Re: [Mono-list] WCF - ServiceSecurityContext
I noticed that monotouch stuff is not about service stuff and the service stack got not working behind the huge HTTP channel listener refactoring last year. Now it is working in git master and 2.10 branch. Note that ServiceSecurityContext still never worked (and it still doesn't). The entire ServiceAuthorizationManager stuff is out of scope of our implementation. Atsushi Eno (2011/02/17 12:33), Atsushi Eno wrote: > All what I know is that it worked for monotouch. > https://bugzilla.novell.com/show_bug.cgi?id=605795 > > Atsushi Eno > > (2011/02/17 0:54), augustwest wrote: >> Thank you Atsushi. I can't seem to find any good samples or >> information that >> demonstrates what is required in mono to make the basic >> authentication work >> utilizing the BasicHttpBinding (most likely using the custom >> validators). Do >> you, or anyone out there, have any good samples? >> >> Currently, I'm trying something along these lines and can't seem to >> get them >> to fire when the client invoke a service call. >> >> selfHost.Credentials.UserNameAuthentication.UserNamePasswordValidationMode >> = >> System.ServiceModel.Security.UserNamePasswordValidationMode.Custom; >> >> selfHost.Credentials.UserNameAuthentication.CustomUserNamePasswordValidator >> >> = new CustomValidator(); >> >> selfHost.Description.Endpoints[0].Contract.ProtectionLevel = >> System.Net.Security.ProtectionLevel.None; > ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Can't build NUnit testing project
On Fri, Feb 4, 2011 at 1:56 PM, Alexander M. Batishchev wrote: > Hi, everybody. > > I have a complex solution (developed under Windows, deployed under > GNU\Linux) with a number of unit-testing projects, using NUnit 2.9.3. > > Here's a reference from project: > > > False > ..\..\..\..\..\Program Files\NUnit > 2.9.3\bin\net-4.0\nunit.framework.dll > > > I downloaded and built NUnit 2.9.3 from source: > > $ xbuild solutions/MonoDevelop/NUnit.Framework.sln /p:Configuration=Release > > and installed into GAC: > > $ gacutil /i solutions/MonoDevelop/bin/Release/nunit.framework.dll > $ gacutil /l nunit.framework > > The following assemblies are installed into the GAC: > nunit.framework, Version=2.9.3.0, Culture=neutral, > PublicKeyToken=96d09a1eb7f44a77 > Number of items = 1 > > and deleted local mono nunit installation: > > $ rm /usr/lib/mono/2.0/nunit* > $ rm /usr/lib/mono/4.0/nunit* > > but when I try to build my solution: > > $ xbuild MySolution.sln | grep error > : error CS0006: Metadata file `/usr/lib/mono/2.0/nunit.framework.dll' could > not be found > > What do I wrong? The GAC is for resolving assemblies at run-time, not compile time. This is true on .NET too. http://monodevelop.com/FAQ#I_added_an_assembly_to_the_GAC.2c_why_doesn't_it_appear_in_the_assemblies_list_when_I_try_to_add_a_reference_in_a_MonoDevelop_project.3f The reason you get the specific error you do is because you removed the compile-time version of the assemblies pointed to by the pkconfig file but did not update or remove the pkgconfig file. -- Michael Hutchinson http://mjhutchinson.com ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] WCF - ServiceSecurityContext
I am having what I believe is the same problem. You say basic authentication is working, any examples? Our project needs the ability to authorize a connection, and currently we cannot. Here is the code that works on Windows but allows anyone to connect on MONO: Public Sub WCFStartService() ' http service, one-way Dim binding = New BasicHttpBinding(System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly) binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic Dim address = New Uri("http://192.168.1.129:8080";) ServiceHost = New ServiceHost(GetType(HelloService)) ServiceHost.Credentials.UserNameAuthentication.UserNamePasswordValidationMode = Security.UserNamePasswordValidationMode.Custom ServiceHost.Credentials.UserNameAuthentication.CustomUserNamePasswordValidator = New CustomUserNameValidator ServiceHost.AddServiceEndpoint(GetType(IHelloService), binding, address) ServiceHost.Open() End Sub Public Class CustomUserNameValidator Inherits IdentityModel.Selectors.UserNamePasswordValidator Public Overrides Sub Validate(ByVal userName As String, ByVal password As String) If Nothing = userName OrElse Nothing = password Then Throw New ArgumentNullException() End If If Not (userName = "user" AndAlso password = "pass") Then ' This throws an informative fault to the client. Throw New FaultException("Unknown Username or Incorrect Password") ' When you do not want to throw an infomative fault to the client, ' throw the following exception. ' Throw New SecurityTokenException("Unknown Username or Incorrect Password") End If End Sub End Class -- View this message in context: http://mono.1490590.n4.nabble.com/WCF-ServiceSecurityContext-tp3307343p3309204.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 - ServiceSecurityContext
All what I know is that it worked for monotouch. https://bugzilla.novell.com/show_bug.cgi?id=605795 Atsushi Eno (2011/02/17 0:54), augustwest wrote: > Thank you Atsushi. I can't seem to find any good samples or information that > demonstrates what is required in mono to make the basic authentication work > utilizing the BasicHttpBinding (most likely using the custom validators). Do > you, or anyone out there, have any good samples? > > Currently, I'm trying something along these lines and can't seem to get them > to fire when the client invoke a service call. > > selfHost.Credentials.UserNameAuthentication.UserNamePasswordValidationMode = > System.ServiceModel.Security.UserNamePasswordValidationMode.Custom; > > selfHost.Credentials.UserNameAuthentication.CustomUserNamePasswordValidator > = new CustomValidator(); > > selfHost.Description.Endpoints[0].Contract.ProtectionLevel = > System.Net.Security.ProtectionLevel.None; ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list