Scenario:
I wanted to check if one of my site collection is FBA enabled.
Solution:
I did a simple check for the Authentication Mode as following.
Code:
using Microsoft.SharePoint.Administration;
using System.Web.Configuration;
public static bool IsWebAppFBAEnabled(SPSite site)
{
SPIisSettings settings = site.WebApplication.IisSettings[site.Zone];
return (settings.AuthenticationMode == AuthenticationMode.Forms);
}
0 comments:
Post a Comment