Reputation: 25161
Membership.ApplicationName
is a static string.
My issue is that if i want to change this value to interogate the membership of another application on the same database, the change is permanent, meaning the Application Name for the current site has now globally changed to this value.
In a perfect world i could call Membership.GetUser($username, $ApplicationName)
, but such a function doesnt exist.
Can anyone offer any ideas?
Upvotes: 3
Views: 445
Reputation: 395
The Membership.ApplicationName is global by design. The MSDN documentation states that if you need an application that can change this value, it should be a single user app.
http://msdn.microsoft.com/en-us/library/system.web.security.membership.applicationname.aspx
(Read the Caution section under Remarks)
There are two alternatives to solving your problem: 1) Create a separate application for administering the users. 2) Write a custom Membership Provider that has the method you suggested. You would need to write the data access layer as well but the DB structure is well defined so it shouldn't be too hard to do.
Upvotes: 1