Winsmarts.com

Microsoft MVP

MVP Logo

Awarded the Microsoft MVP Award.

Hosted By

blah!bLaH!BLOG!!

Using two kinds of authentication on a SharePoint site

Posted on 12/1/2007 @ 3:01 AM in #Sharepoint | 0 comments | 3831 views

Consider the situation, you have a SharePoint site, protected by Forms Based Auth, and you also need to write code that will use the SharePoint API (say a windows service that needs to work with SharePoint).

This is a much too common scenario, and here is how you should implement this.

  • I assume that the SharePoint site is in a domain.
  • Create a domain user, say domain\smalik.
  • Run the service as the domain\smalik user.
  • Now, via the farm's central admin, extend the web app to another port - this time protected by Windows Auth.
  • From the windows auth site, add domain\smalik to the site with full control (or whatever restricted control, should your code be happy with it).
  • Go back to central admin, and delete the extended website.
  • Ensure that the AAMs & host headers are setup appropriately, or you'll get "No web application at URL ...." error.
  • Thats it! Now your Load balanced, FBA site will be accessible via SharePoint API, as long as your code runs as domain\smalik.

Please post your comments:


Your feedback will be submitted for moderation, and will appear after it is approved.

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 

Site designed and maintained by Sahil Malik | All Rights Reserved. ©2007 WinSmarts.com.