Access same Membership data from different projects

  • Thread starter Thread starter brown
  • Start date Start date
B

brown

Is it possible to access the authenticated user data using the Membership
and MembershipUser classes from an asp.net 2.0 project that doesn't contain
the login controls?

For example, one project logs users in with the login controls. Another
project in a subfolder (so only accessable by authenticated users) uses
methods like Membership.GetUser("john"); Whenever I try this, it just
returns a null MembershipUser object. Am I just doing something wrong or is
this not possible because membership is somehow tied to a project?
 
If you're using forms authentication, the membership (by default) relies on
a cookie. Is it possible that you've created a separate application that
isn't recognizing the initial cookie?
 
I discovered the problem, in the membership users table, the application
column must match. This can be fixed by setting the applicationName property
to "/" in the web.config. thanks for the response!
 
Back
Top