|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Membership ApplicationName
I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the Membership & Roles ApplicationName to separate out my different groups of users within the membership database. I had been having problems with ‘random’ bugs - as though my Membership database was 'sharing' information between users and applications rather than keeping it separate. I have now come across this article. Is what it is saying about Membership being a singleton true? --------------------------------------------------------------------------------- The Membership and Role classes use the singleton design pattern. I did not instantiate either one in my code to access their ApplicationName properties, I just used the instance that is automatically created for me. All applications running on the same web server share the same instances of these classes, and when one application changes a property, all applications are affected. How can different applications use separate roles and users without stepping on each other then? If your applications are big enough to each have their own web server - or web farm - there is no problem. You can set the application names in machine.config and not worry about it. They can share a centralized membership services database without interfering with each other. You could set up separate databases to support membership services for each application, at the loss of some centralization. You could also just use the stored procedures directly, rather than accessing them through the Membership and Role methods. This approach lets you set the application name directly, without reference to the properties. http://microsoft.apress.com/feature/59/membership-information-and-multiple-applications ePrint wrote:
> Asp.Net v2.0 There was no way for you to know it (except maybe by browsing throughsome of the previous questions before posting yours - always a recommended practice), but this is a classic asp newsgroup. ASP.Net is a different technology from classic ASP. While you may be lucky enough to find a dotnet-savvy person here who can answer your question, you can eliminate the luck factor by posting your question to a newsgroup where the dotnet-savvy people hang out. I suggest microsoft.public.dotnet.framework.aspnet. There are also forums at www.asp.net where you can find a lot of people to help you. -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup. |
|||||||||||||||||||||||