sharing asp.net membership database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to share the ASP.Net database that maintains membership
information? I want to use a single database install with several
independent sites. I've seen where there is information about "applications"
being stored, but haven't found a way to specify between applications/sites.

Thanks,
Phil
 
I think you can do this using the Application_AuthenticateRequest event in
the global ASAX to get to your security provider. I have not done this
myself, but I think this could be the way to do it.
 
Not if you use Access for your database.
Using Access would require different databases.

If you use SQL Server or SSE you shouldn't have a problem.
Just pointing to the database you want to use should be enough.





Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
Thanks for the replies.

I'm using SQL Server 2000 currently, and will likely move to 2005 when I
have time. To my understanding, simply pointing to mutiple sites to the same
database will mean they share both the database and the date. For instance
users from Site A will be able to long into Site B. I'm wanting to share the
database install among sites, but not the data. I want users from Site A to
be able to only access Site A, and Site B to only access Site B.

Thanks,
Phil
 
I'm wanting to share the
database install among sites, but not the data. I want users from Site A to
be able to only access Site A, and Site B to only access Site B.

When you configure the <membership> section in web.config (which
you'll have to do to point to anything other than a SQL express
database in App_Data), then set ApplicationName for each of your
application's to a unique string.

ApplicationName is used to scope membership data so it will not be
shared.
 
Thanks, I'll give that a try.

Scott Allen said:
When you configure the <membership> section in web.config (which
you'll have to do to point to anything other than a SQL express
database in App_Data), then set ApplicationName for each of your
application's to a unique string.

ApplicationName is used to scope membership data so it will not be
shared.
 

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

Back
Top