Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've configured 2 zones in sharepoint 2013. Both zones are configured to use NTLM and FBA authentication in order to have full availability of all users in the people picker.

My extranet zone (FBA) has custom sign in page set to /_forms/default.aspx... which works a treat with both fba login and people picker behaving as required. Configuring my intranet zone (NTLM) to use the default NTLM login URL /_windows/default.aspx... causes it to return an application runtime error. I understand that if I create a custom login page for NTLM I should be able to present my intranet users with transparent login. Is there anyone able to provide pointers on how to set up a custom page for NTLM?

I've found this post (http://tomaszrabinski.pl/wordpress/2011/06/23/sharepoint-2010-custom-login-page/) which is exactly what I need but have been unable to implement it for SP2013. Any help would be greatly appreciated. I'm not a coder but have given it a go in vs2013 using zavaz code. Changed the identity model reference and got the solution deployed to my test site butt getting server block errors etc. Gonna keep working through it. If I eventually get sorted I'll post my findings.

share|improve this question
    
Further researched uncovered this ( spautomaticsignin.codeplex.com ) solution for Sharepoint 2010. However I want to authenticate all users transparently via ntlm. Limiting via ip is a little overkill for my scenario but could work. I may give this a go even though it may not be compatible in 2013. –  Joss_24 Feb 5 '13 at 18:36
    
have you got any solution for this? I am also using mixed mode but not happy the way SP asks users windows authentication or Forms based authentication. is there any way I could login into Sharepoint from an API if I know user is in SQL profile or in active directory? –  user15404 Mar 7 '13 at 17:42

2 Answers 2

I can't comment on user1272352's answer (rep too low), but that is correct. I had the same problem when creating my custom login page, and the answer was to add the "/_layouts" to the front of the path I was linking to.

If you want some form of shared login screen, without needing the IP address or a feature or anything else, here's what I did to get that:

  1. For each site involved, created a new copy of the FBA login folder in LAYOUTS. These folders can then be modified per site and used as the custom login page for that site.

  2. On my custom login screens, I added a link such as "Employee Login" that points to the NTLM login page (/_layouts/windows/default.aspx)

  3. Had a policy pushed out so that all company machines had the site domains added to their 'Trusted Sites' zone in the browser

The end result is that everyone gets the same login screen. FBA accounts can enter their information normally, and AD users can click the "Employee Login" link to authenticate via NTLM. With the site being trusted, the browser passes their Windows credentials so they log right in with no prompt.

share|improve this answer
    
your end result is exactly what I want, but I don't understand everything you explain here. Can you be more precise ? Sorry to be a that weak. I can't find the Layouts folder, and if I add a html link to /_layouts/windows/default.aspx, it brings me to an error =/ Thanks in advance ! –  Nico Apr 2 at 11:47
    
The _layouts folder is located at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS. The _forms one is at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\IDENTITYMODEL\FORMS. I just made a copy of that default forms folder and then pointed the default login page (in the Authentication Provider for the webapp) to my custom folder & page. –  Omegacron Apr 2 at 13:28
    
Thanks for your reply ! I now see these folders. So nothing to do with the VirtualDirectories\XXXX_forms\Default.aspx ? I can put this page as the default one, right ? So why I can't add a simple html link that redirect to NTLM Authentication ? Because I don't understand : you copied your FORMS folder, in order to save it, right ? then you modified the copy (so you modify default.aspx) and you just put a html link that points on /_layouts/windows/default.aspx ? –  Nico Apr 2 at 13:46
    
(Not enough caracters to edit my comment above) So, I have to copy/paste/rename the IDENTITYMODEL\FORMS folder (example, I name it CustomLogin). I change de default.aspx, and I can add the following line : <a href="/_windows/default.aspx?ReturnUrl=<%=Request.QueryString["Source"] %>">click here to login</a></td>, and then, from the central admin, I change the default page by /_identitymodel/_CustomLogin/default.aspx Am I right ? –  Nico Apr 2 at 14:09
    
It works ! the path to the default page is : /_layouts/CustomLogin/default.aspx –  Nico Apr 2 at 14:53

With SharePoint 2013 the same code will work with bit modification. As SP2013 supports code written in SP2010 as well, and it has both 14 hive and 15 hive, you need show in your code which mapped folders to look for.

In your aspx file you need to write the full path of the mapped folders as shown below /_layouts/15/images/ or /_layouts/15/

Rest of all tags and functions should work as it is.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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