Access same Membership data from different projects

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?
 
K

Ken Cox [Microsoft MVP]

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?
 
B

brown

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top