ProfileBase.Create Method (String)
Assembly: System.Web (in system.web.dll)
public static ProfileBase Create ( String username )
public static function Create ( username : String ) : ProfileBase
Not applicable.
Parameters
- username
The name of the user to create a profile for.
Return Value
An ProfileBase that represents the profile for the specified user.| Exception type | Condition |
|---|---|
| The enabled attribute of the profile section of the Web.config file is false. | |
| The current hosting permission level is less than Medium. | |
| A property type specified in the profile section of the Web.config file could not be created. -or- The allowAnonymous attribute for a property in the profile section of the Web.config file is set to true and the enabled attribute of the <anonymousIdentification> element is set to false. -or- The serializeAs attribute for a property in the profile section of the Web.config file is set to Binary and the IsSerializable property of the specified type returns false. -or- The name of a provider specified using the provider attribute of a profile property could not be found in the Providers collection. -or- The type specified for a profile property could not be found. -or- A profile property was specified with a name that matches a property name on the base class specified in the inherits attribute of the profile section. |
- AspNetHostingPermission for operating in a hosted environment. Permission value: Medium.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.