3

I am quite new in this area and I need your advice.

I have created a custom log in page using .NET SQL authentication. It works fine. Whereas, for windows (AD) authentication the traditional pop up is used. How can I change the default log in page(pop up) for windows (AD) authentication and at the same time keeps the SQL authentication in the other page?

I cannot change the settings in Central Administration / Authentication Providers, because I need these details for .SQL authentication. How can I establish windows (AD) authentication using LdapMembershipProvider without changing Central Administration / Authentication Providers settigns?

I'm using Visual Studio, I created an empty SharePoint project, added a new Application page. I redirected my Sharepoint default page to my custom log in page (using SQL authentication), is there any way to accomplish also AD authentication within application page ?

Any advice would be appreciated.

1

If I understand correctly, you would like to windows authentication users logged in automatically using the popup, while also showing the login page for FBA users.

The big issue is that once you ask the browser to authenticate via AD, you won't be able to show a page until they respond to the AD login request - so you have to know in advance if the user needs to login via AD before you attempt to log them in via AD.

There are a couple of ways to work around this:

1) Create a custom FBA login page. In addition to the login button for the FBA login, add a "Windows Login" button. Have this button redirect the user to the standard SharePoint AD login page, which will authenticate them via AD. So in this case the user will always see one page where they can either login directly with a username and password, or press a button to login via windows authentication.

2) Have multiple zones for the web application (You would use different urls for each zone. ie www.domain.com for internet (FBA) and intranet.domain.com for your intranet (AD)). Then you would just configure each zone to either use FBA or AD.

3) Use this project on CodePlex: https://spautomaticsignin.codeplex.com/ to direct users to the proper login page based on ip address. So if they're on the lan, they'll be directed to the AD login page and if they're not, they're directed to the FBA login page.

4) Just use the built in SharePoint method for handling multiple authentication choices: the user always gets a page with a dropdown where they can choose to login either with FBA or with Windows.

  • Thanks Chris for your reply. Log in page based on ip address sounds very interesting. However, I wanted to ask you the following: Is there any chance to replace AD log in request (pop up window for windows authentication) with a custom login page ? Can I establish windows authentication using my custom login page? like custom FBA login page ? I want to avoid using browser popup to authenticate via AD. – michaalis Jan 15 '14 at 7:07
  • Yes - if you want to login with Windows credentials using FBA, you'd use the LDAPMembershipProvider that you mentioned in your question as your membership provider. Do you want to use that AS WELL AS SQL Authentication? Because you could just put your sql users into AD and have it authenticate in a single place. If you want to have the two membership providers, you 'd have to setup two seperate zones. Alternatively you can build a custom membership provider, that joins the LDAPMembership provider and the SQLMembershipProvider. I'd recommend you just stick with the one provider though. – Chris Coulson Jan 15 '14 at 14:32
  • Okay, I understand everything! Thank you very much for your answer :) Unfortunately, I don't have enough reputation yet to mark your answer as useful!!! – michaalis Jan 16 '14 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.