Back to all posts

Importance of the ASP.NET Membership "applicationName" Setting

Posted on Feb 05, 2007

Posted in category:
Development
ASP.NET

One configuration setting that seems to be overlooked frequently with ASP.NET 2.0’s membership provider is the applicationName setting. This setting is very important if you ever want to move your application from one server to another or if you want to share users between multiple ASP.NET applications.

With ASP.NET membership provider stores all user information associated with a specific “Application Id” this application id is created based on the name of the application. This allows one ASP.NET membership database to support multiple web applications with multiple sets of user identities. If you omit the applicationName setting the ASP.NET runtime assigns a specific value for the application based on the current installation location/system.If the application was moved to a different server this value would change. Therefore, this value should really be set for each application!

One benefit of this setting is the ease of use to share user accounts between applications. If you set the applicationName to the same value for multiple applications their membership providers will pull from the same user database allowing the users to use their same login credentials for both applications. For more information on membership in ASP.NET 2.0 please see this MSDN Article http://msdn2.microsoft.com/en-gb/library/yh26yfzy.aspx.