Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FormsAuthenticationConfiguration.Domain Property

Gets or sets the domain name to be sent with forms authentication cookies.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public string Domain { get; set; }
/** @property */
public String get_Domain ()

/** @property */
public void set_Domain (String value)

public function get Domain () : String

public function set Domain (value : String)

Not applicable.

Property Value

The name of the domain for the outgoing forms authentication cookies. Default is an empty string.

The Domain is used for the authentication cookies.

This property corresponds to the value of HttpCookie.Domain.

This setting will take precedence over the domain attribute of the httpCookies section for forms authentication cookies.

The following code example shows how to access the Domain property. Refer to the code example in the FormsAuthenticationConfiguration class topic to learn how to get the section.

// Get the current Domain.
string currentDomain = 
    formsAuthentication.Domain;

// Set the current Domain
formsAuthentication.Domain = "newDomain";



Windows 98, Windows Server 2000 SP4, 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.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.