in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Rajiv and Michael's SharePoint discoveries and musings...

Forms Authentication, Search, and Anonymous in WSS/MOSS 2007

We have encountered several issues while trying to incorporate CustomMembershipProvider and CustomRoleProvider in WSS 2007 B2TR under Forms Authentication.  Most notably:

  • Search does not work with forms authentication (separate post with more detail here)
  • Forms authentication causes issues in Central Admin
  • Anonymous Access is very difficult to set up for forms authentication.

Many similar concerns are discussed in the comments for the MSDN Blogs article "Configuring Multiple Authentication Providers" article so we've made a comment there, and hopefully someone will respond with some answers on the search issue.  In the meantime, these tips may help you with Forms Authentication providers:

ISSUE #1: Unknown Error in Central Admin working with Forms Authentication
If you have created a role provider, make SURE the <roleManager...> node is NOT in your Central Admin web.config.  This will work in a web.config for a Sharepoint site, but not for the Central Administration site.  Central Admin will only use your authentication provider to verify usernames when you select site administrators, so the role provider would never be used anyway.

ISSUE #2: WSS/MOSS throws an Unknown Error when creating a new Web Application or Site Collection under Forms Authentication
For creating ANY new website (forms or windows auth), you need to remove the <membership...> node from the Central Admin web.config.  To create a new Forms website, follow these steps:

  1. Remove the <membership...> node from the Central Admin web.config.
  2. Create your new web application and site collection in Central Admin, and set it to use Windows Authentication.  
  3. Replace your Forms Provider's <membership...> node in the Central Admin web.config.
  4. Now go back into Central Admin and set the Authentication Provider (Central Administration > Application > Authentication Providers) to Forms on your new site.
  5. Your site should now work with your provider.

ISSUE #3: Unable to allow Anonymous Users under Forms Authentication
Actually, you can, it is just not easy or fun.  Here are all the steps you need to allow anonymous users on your site WITH Forms Authentication.

  1. In Central Administration > Application > Authentication Providers, check the "Enable Anonymous Access" checkbox for your site.
  2. Make sure the anonymous user (or Everyone if you're lazy) has read and script access to your site's folder using Windows security (the files are usually in inetpub\wwwroot\wss\VirtualDirectories\[port number]).  Be sure to set those permissions on all the child folders as well.
  3. Now for the fun part. In Central admin, switch your site back to using Windows authentication.  Then, make sure your NTLM user is the site owner.
  4. Log in to your site, and select Site Actions > Site Settings > Advanced Permissions > Settings > Anonymous Access.  If this is on Nothing, change it to "Entire Web Site".
  5. Save this setting, then switch your site back to forms authentication in Central Admin.  You can not change the Anonymous Access radio buttons while in Forms authentication mode!

Hope this helps.  Good luck!

-Nathan and Rajiv

Comments

 

Gheorghe Sorin said:

Yes, it worked. I thouth that only 2 administrators are allowed. and no anonymous acces :P

August 12, 2008 10:02 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts