DevForce Help Reference
AspAuthenticatingLoginManager Class
Members 


IdeaBlade.EntityModel.IEntityLoginManager implementation integrating with ASP.NET Membership, Role and Profile services.
Object Model
AspAuthenticatingLoginManager ClassEntityManager Class
Syntax
'Declaration
 
<DefaultExportAttribute(IsDefault=True, 
   ContractName="", 
   ContractType=IdeaBlade.EntityModel.IEntityLoginManager)>
Public Class AspAuthenticatingLoginManager 
   Implements IdeaBlade.EntityModel.IEntityLoginManager 
'Usage
 
Dim instance As AspAuthenticatingLoginManager
[DefaultExport(IsDefault=true, 
   ContractName="", 
   ContractType=IdeaBlade.EntityModel.IEntityLoginManager)]
public class AspAuthenticatingLoginManager : IdeaBlade.EntityModel.IEntityLoginManager  
Remarks
The AspAuthenticatingLoginManager will be used by DevForce if a custom IdeaBlade.EntityModel.IEntityLoginManager is not found and ASP.NET compatibility is enabled. Two configuration settings must be set to enable this: 1) the aspNetCompatibilityEnabled flag (see below) and 2) the ServerSettings.UseAspNetSecurityServices flag.

The AspAuthenticatingLoginManager supports both Windows and Forms authentication. If an IdeaBlade.EntityModel.ILoginCredential is provided with the login, then Forms authentication is performed (if set correctly in the config). The credential is validated with ASP.NET Membership, if Roles are enabled they will be retrieved, and if Profile is enabled Profile properties will be retrieved.

If an IdeaBlade.EntityModel.ILoginCredential is not provided with the login, then DevForce attempts to load the current user from HttpContext.Current.User. This user is available if the user has already logged in (as part of an ASP.NET application), if Windows authentication is used, or if a persistent token was used with a prior login. A IdeaBlade.EntityModel.UserBase is built from the current user information; if a RolePrincipal the roles will be copied to the UserBase; if Profile is enabled then Profile properties will be retrieved.

To use Profile properties, sub-type the IdeaBlade.EntityModel.UserBase class and include public properties with the same names as your Profile properties: DevForce will automatically find and populate your custom type, and you will not need to implement a custom login manager.

If guest logins are allowed (see the ServerSettings.AllowAnonymousLogin) then an "anonymous" user will be returned in some situations: 1) if the current user is not authenticated or there is no current user, or 2) a credential is passed but Forms authentication is not enabled. The first situation will occur when a "load user" style login is attempted: if there is no current user to load, then an anonymous user is returned.

To use ASP.NET security features with the BOS be sure to also set the following in the system.serviceModel section of your configuration file: <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

Set either Windows or Forms authentication using the system.web section of your configuration file: <authentication mode="Forms" /> // or <authentication mode="Windows" />

To enable the ASP.NET Role Manager set the following in the system.web section of your configuration file: <roleManager enabled="true" />

To enable the ASP.NET Profile feature set the following in the system.web section of your configuration file: <profile enabled="true"> <properties> <add ... == add properties == </properties> </profile>

Inheritance Hierarchy

System.Object
   IdeaBlade.EntityModel.Web.AspAuthenticatingLoginManager

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AspAuthenticatingLoginManager Members
IdeaBlade.EntityModel.Web Namespace

Send Feedback