Advertisement

05.07.2008 at 03:17AM PDT, ID: 23382204
[x]
Attachment Details

Using windows authentication followed by forms authentication with WCF & Custom membership provider

Asked by elimesika in Visual Studio, .NET Framework 3.x versions

Tags: , , ,

My server is exposed to the clients via WCF.
I have 3 types of clients 1)ASP.NET 2)WPF 3) Powershell scripts
My task is to provide authentication mechanism that will use Windows Authentication on first and only if it fails , the client will raise a form asking the user to enter user/password.
The same authentication mechanism should apply from clients to the WCF service & from the WCF service to the Active Directory
I will also like to use my Custom Membership Provider that is inherited directly from Microsoft ActiveDirectoryMembershipProvider.
I need an advice for the best way to accomplish this task.
Questions :
------------
1) Can I trap a Windows Authentication failure in order to raise a login form/window.
2) Is there a way to configure WCF for both Windows/Username options without two separate endpoints.
3) Does it make sense to use WCF settings + Custom membership provider for this task.
4) Can I use a client with no provider/Active Directory settings where the client authenticate itself to the WCF service and only this service verifies the user against the Active Directory

Open Issues
----------------
1.      I have didn't found any way to support in powershell command scripts both:
a.      Login(user, password) command
b.      Login() command (using Windows Authentication)
Only one can be supported for a given client.
2.      I have found no way to use only one end-point and still enabling clients to connect with both Forms/Windows methods.
3.      Seems that, when using Windows Authentication, the service connects to the Active Directory using the credentials of the user that runs the service. That means that we will have to define the NETWORK SERVICE under which the service is running as an Active Directory user with read privileges.

ThanksStart Free Trial
Attachments:
 
Sample WCF service app config file
 
 
sample web client web config file
 
[+][-]05.07.2008 at 07:10AM PDT, ID: 21516526

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio, .NET Framework 3.x versions
Tags: Microsoft, .NET 3.0 WCF, 3.0, Autehntication, Custom membership provider
Sign Up Now!
Solution Provided By: BSonPosh
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05.10.2008 at 01:16PM PDT, ID: 21540370

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628